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.
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024