Add To Cart Button adds the wrong Variant of product

New Member
5 0 0

Hello, I have a problem where when you add a certain variant to cart, it reverts back to the default. For example, the default size when you come to the page of one of my products is small. When someone tries to add a Medium of that same product to their cart, the cart defaults it back to a small. How do I fix this? Here's my site URL. DURAGHENNI – DURAGHENNI

0 Likes
Shopify Expert
627 32 131

It looks like the variant ID value in the Add to Cart form does not update when switching variants.

<input type="hidden" name="id" value="37149365469347">

This has to be dynamically updated with Javascript when switching variants. 

0 Likes
New Member
5 0 0

Hello, thanks for replying. I’m kinda unfamiliar with coding. How would I update with Javascript when switching variants?

0 Likes