Fix appending quantity to rel attribute (accounts for variants)

Saw an issue if there are variants where the quantity kept getting appended on the end of the rel tag.