Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello, we are facing an issue with our size selection in our product page. No matter whatever different size product our customers are selecting, by default "XS" only one single size getting added at checkout. We are loosing out on our customers and cancelling orders because of this issue.the image shows that size selected is XXL but in cart XS is getting added
This is most likely an issue with the liquid code on the main-product page. It would be hard to fix without seeing that code.
Have you edited any of your theme files or have had anyone edit them?
NO
Hi @arte-alter
Please share your store url, it's not visible in your screenshot.
So, after doing a little bit of troubleshooting, it does look like your site is not updating the hidden options that Shopify uses to add items to carts.
this would be in the product-template.liquid between lines 171 and 189
{% unless product.has_only_default_variant %}
<div class="product-form__controls-group">
{% for option in product.options_with_values %}
<div class="selector-wrapper js product-form__item">
<label for="SingleOptionSelector-{{ forloop.index0 }}">
{{ option.name }}
</label>
<select class="single-option-selector single-option-selector-{{ section.id }} product-form__input"
id="SingleOptionSelector-{{ forloop.index0 }}"
data-index="option{{ forloop.index }}"
>
{% for value in option.values %}
<option value="{{ value | escape }}"{% if option.selected_value == value %} selected="selected"{% endif %}>{{ value }}</option>
{% endfor %}
</select>
</div>
{% endfor %}
</div>
{% endunless %}
Here is how those lines should look,at least with debut v17.14.1
I would suggest making a copy of your site and try replacing the lines in your theme, with the lines I posted here and then previewing your site on the copied theme and see if the correct product gets added to the cart.
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