sorry, i forget to keep this code {% assign variant_count = option.values | size %}, i just updated code again and now its working properly.
Thank you so Much ![]()
Issue: A merchant using Dawn theme (v13.0.1) wants to hide variant labels/buttons for products with only one option (e.g., showing size variants but hiding single-option color/fabric selectors).
Constraint: The merchant needs to keep these single variants in the backend for Google Merchant Center feed requirements, but hide them from the front-end display.
Solution Provided:
product-variant-picker.liquid file in theme code{% assign variant_count = option.values | size %} next to the line {%- for option in product.options_with_values -%}{% if variant_count <= 1 %}hide_single_variant{% endif %} next to both âproduct-form__inputâpillâ and âproduct-form__inputâdropdownâ classes.hide_single_variant { display: none !important; } to base.css fileInitial Problem: First approach caused âitem unavailableâ errors because hiding variants broke the add-to-cart flow (which requires all variant options to be selected).
Resolution: The revised solution successfully hides single-option variants while maintaining functionality. Confirmed working by original poster.
Note: One user with Turbo theme v3.0.1 requested similar guidance but lacks the product-variant-picker.liquid file (theme-specific difference).
sorry, i forget to keep this code {% assign variant_count = option.values | size %}, i just updated code again and now its working properly.
Thank you so Much ![]()