Solved

Hide size variant buttons for non-stock variants

Iceman3
New Member
21 0 0

Does anybody know how to hide the buttons of the non-stock variants in DAWN 13?

Thanks in advance for your help.

Regards,

 

screenshot1.jpeg

Accepted Solution (1)

Kyle_liu
Shopify Partner
26 6 7

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 %}

"

 

 

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to contact me on (liushuaicc@shinetechsoftware.com)

View solution in original post

Replies 2 (2)

Kyle_liu
Shopify Partner
26 6 7

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 %}

"

 

 

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to contact me on (liushuaicc@shinetechsoftware.com)
Iceman3
New Member
21 0 0

Works perfectly. I mark anwer as 'Accepted solution'

Thanks for your help!