Hy guys. I hope you can help me . Product sizes grid look like this. If size variant sold out - name + Sold out status.
I was able to implement in this way -
{% for value in option.values %}
{% if product.options_with_values.size == 1 %}
{% assign show_sold_out = 1 %}
{% else %}
{% assign show_sold_out = 0 %}
{% endif %}
{% assign sold_out = false %}
{% if show_sold_out %}
{% for variant in product.variants %}
{% if variant.option1 == value %}
{% unless variant.available %}
{% assign sold_out = true %}
{% endunless %}
{% endif %}
{% endfor %}
{% endif %}
{{ value }}{% if sold_out %} - {{ 'products.product.sold_out' | t }}{% endif %}
{% endfor %}
But, if product have two sized grid , sold out status work only in first size options.
What i am need change in code to make it work with two sized grid? Do not show sold out status in the first and show sold out status in the second sized grid.