Shopify themes, liquid, logos, and UX
Does anybody know how to hide the buttons of the non-stock variants in DAWN 13?
Thanks in advance for your help.
Regards,
Solved! Go to the solution
This is an accepted solution.
1、Edit theme code
2、find the file: "product-variant-options.liquid" and edit it.
3、Find: "<input
type="radio"
id="{{ input_id }}"
name="{{ option.name }}"
value="{{ value | escape }}"
form="{{ product_form_id }}"
{% if option.selected_value == value %}
checked
{% endif %}
{% if option_disabled %}
class="disabled"
{% endif %}
>
<label for="{{ input_id }}">
{{ value -}}
{{ label_unavailable }}
</label>" is modified as follows
"
<input
type="radio"
id="{{ input_id }}"
name="{{ option.name }}"
value="{{ value | escape }}"
form="{{ product_form_id }}"
{% if option.selected_value == value %}
checked
{% endif %}
{% if option_disabled %}
class="disabled" style="display:none"
{% endif %}
>
{% if option_disabled == false %}
<label for="{{ input_id }}">
{{ value -}}
{{ label_unavailable }}
</label>
{% endif %}
"
This is an accepted solution.
1、Edit theme code
2、find the file: "product-variant-options.liquid" and edit it.
3、Find: "<input
type="radio"
id="{{ input_id }}"
name="{{ option.name }}"
value="{{ value | escape }}"
form="{{ product_form_id }}"
{% if option.selected_value == value %}
checked
{% endif %}
{% if option_disabled %}
class="disabled"
{% endif %}
>
<label for="{{ input_id }}">
{{ value -}}
{{ label_unavailable }}
</label>" is modified as follows
"
<input
type="radio"
id="{{ input_id }}"
name="{{ option.name }}"
value="{{ value | escape }}"
form="{{ product_form_id }}"
{% if option.selected_value == value %}
checked
{% endif %}
{% if option_disabled %}
class="disabled" style="display:none"
{% endif %}
>
{% if option_disabled == false %}
<label for="{{ input_id }}">
{{ value -}}
{{ label_unavailable }}
</label>
{% endif %}
"
Works perfectly. I mark anwer as 'Accepted solution'
Thanks for your help!
It does not work on the empire theme. I tried every solution in the community for two days. Do you know how to hide sold out variants in the Empire theme?
I would be grateful for a tip.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025