html - Shopify Input Value Is Overidden Somehow
If you have any input on what's going on here I sure would appreciate it. When I add more than one variant, my quantity input breaks.
I have a Shopify product with only ONE variant here:
I have essentially the same product duplicated, but with TWO variants here:
Note: If you're looking closely you'll see the input populate correctly for a split second, then revert to the broken input field that says "add to cart" instead of "1". Is there something I should be doing to populate individual inputs when there's more than one variant?
This is the code we're using to populate the quantity box:
<div class="di-quantity-wrap"> <label class="product-quantity-label" for="quantity"> Quantity: </label> <input class="input-field product-quantity-input" type="text" name="quantity" value="1"> </div>
Thank you in advance!
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.