Accepting credit cards, warehouses, and shipping and fulfilling orders
I have 2x variant options available in my store but when someone selects a different variant from the second dropdown and clicks add to cart, the first/default variant is added.
Could someone please let me know where to start to fix this?
Here are some screenshots:
Hello @stevo018 ,
Seems you customized the code but forgot to wrap the variant selector html/code inside the form tag. Wrap variant code inside the form tag and it will start working.
Thanks
Thank you, I'm going to start trying to fix it based on your advice. I've noticed that the quantities selected on the product page don't go through to the cart either.
Will this be part of the same issue?
Yes, this is most likely related.
To debug the issue, you can inspect the elements of your cart form to check if the hidden inputs are updating if you change the product variant.
It looks like your theme JavaScript is not listening for input changes, manually altering the hidden inputs works:
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025