How can I display product variants separately on Impulse theme collection page?

How can I display product variants separately on Impulse theme collection page?

DVR
Visitor
1 0 0

Hi,

 

I would like my product variants to show up separately on the collection page so that you can see the different colour options available and the collection page looks fuller. My theme is Impulse. Does anybody know how to do this?

 

Many thanks

Reply 1 (1)

I_KNOW_NOTHING
Shopify Partner
45 0 11

Hey,

What you can do is find the product loop in your collection (something like this {% for product in collection.products %}) then you place this snippet of code wherever you want it to show

{% for variant in product.variants %}
<p>{{ variant.title }} </p>
{% endfor %}

You can check this link for full variant object you can use: https://shopify.dev/api/liquid/objects/variant

Hope that helps you