Shopify themes, liquid, logos, and UX
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
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.
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.
User | RANK |
---|---|
150 | |
109 | |
90 | |
54 | |
53 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By