I am trying to render the sizes for a product, and in the variants, if an option is unavailable, I want to disable the button, but how can I check if the variant option is unavailable?
{% for value in option.values %}
<option
value="{{ value | escape }}"
{% if option.selected_value == value %}selected="selected"{% endif %}
{{ value }}
</option>
{% endfor %}
I will have to use option.values in this case and can’t switch to product.variants