I am trying to show Product size on the product Grid (collections), I found a piece of a code and created size.liquid (snippets) as below:
{% if collection.handle == “Bra & Bralette” or collection.handle == “Panties” or collection.handle == " Lingerie" or collection.handle == “Sleep” or collection.handle == " Swim" or collection.handle == “Sport & Lounge” or collection.handle == " Beauty" or collection.handle == " Accessories" or collection.handle == " Apparel" or collection.handle == " Bags" or collection.handle == " Shoes" or collection.handle == “Jewelry” or collection.handle == " Art" or collection.handle == “Others” %}
{% for option in product.options %} {% if option == 'Size' %} {% if product.options_with_values[0].name=="Size" %} {% for variant in product.variants %}
{{ variant.option1 }}
{% endfor%}
{% elsif product.options_with_values[1].name==“Size” %}
{% for variant in product.variants %}
{{ variant.option2 }}
{% endfor%}
{% else %}
{% for variant in product.variants %}
{{ variant.option3 }}
{% endfor%}
{% endif %}
{% endif %}
{% endfor %}
And added {% render ‘size’ %} in the card-product.liquid, however, nothing happened, can someone help on this? (By the way, I am using Dawn theme)
Thank you.