FROM CACHE - en_header

Quantity selector not syncing with cart

Simon791
New Member
3 0 0

I have custom quantity selectors in place for various products (new liquid template added for each product). See below:

{% assign quantityOptions = '1,2,3,4,5,6,7,8,9,10' | split:',' %}
<label for="quantity">Quantity: </label>
<select id="quantity" name="quantity">
{% for q in quantityOptions %}
<option value="{{ q }}">{{ q }}</option>
{% endfor %}
</select>

These work great but when an amount is selected on the product page using the selector it doesn't reflect the same amount shown in the cart when you go to 'View Cart'. It only shows '1'. Does anyone know why these don't sync?

 

Cheers

Replies 2 (2)
LitExtension
Shopify Partner
4084 813 860

Hi @Simon791,

Please change the code as below:

<label for="quantity">Quantity: </label>
<select id="quantity" name="quantity">
{% for i in (1..10) %}
<option value="{{ i }}">{{ i }}</option>
{% endfor %}
</select>

Hope it helps!

If you find my answer helpful, please mark it as a solution. Thank you and good luck.

LitExtension - #1 Shopping Cart Migration Expert
If our answer is helpful then please accept as solution!
Get your 1-month Shopify free trial from LitExtension. CONTACT US!
Are you looking for a solution to migrate to Shopify? Try our FREE DEMO now!
Simon791
New Member
3 0 0

Hi. Thanks for the reply.

Didn't work unfortunately. I selected 10 of the product, added to cart but in the cart at checkout it says only 1.