How to display sizes on collection pages in Modular?

Hi I would like to add the sizes in the collection pages so that people can see which size is available and choose it

This is an example of a website that has it: https://www.vrggrl.com/collections/vrg-grl-festival-edit

how could I do it?

1 Like

@francescoromito

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

@francescoromito ,

Have you checked in customizer area?

@francescoromito ,

Search this code in product.liquid file

and add the code for size in collection.liquid file.

@francescoromito

can you please add this code product gird item file bottom


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

Where should I add this code?

Product card gird

If i put it there I cannot see sizes in collection page

1 Like

@francescoromito

sorry for that but i can’t see size variant any product