How to display "size" in collection page and product detail page?

Hi Brittany,

We have an app called Size Swatch which can assist to display the size under the product thumbnail on your collection page for you.

It allows you to customise how the size looks in terms of size, shape and color.

https://apps.shopify.com/product-size-swatch

Let me know if you have any questions, happy to help.

Amy

it says page not found when i try to install

Hi Jodi,

Thanks for your message. I am sorry you were unable to install the app.

This has been fixed and you can install now here:

https://apps.shopify.com/product-size-swatch

Please let us know if you need any assistance to get the app setup on your theme at contact@sizeswatch.com

Thanks

You can use the app Swatch specialist: https://apps.shopify.com/swatch-specialist

The app and the support is amazing!

Hi @Silverclouding !

Thanks for your code.

I’m using it in my current theme but the problem is that “include” is deprecated. How can I show the variant options in the product-grid-item.liquid using render instead of include?

The code didn’t work when I changed include for render.

Please your help.

Best,

JP

Hi
Needed some help

I have the Avone theme,

Can’t figure how to show sizes in my collection page.

I do have have an option to show color swatches.

hello, If someone need it. Now include is deprecated then you need to use render:

{%- render ‘ASSETNAME’ with product as product -%}

Thank you so much for this snippet! It worked perfectly for me.

Would you know how to get it to display a shortened version of the variant? Ex: “Small” → “S”

I tried using {% if variant.options == “small” | replace: “small”, “S” %} or {% if variant.options contains “small” | replace: “small”, “S” %} but it didn’t work.

Hi. How are you? I used your code on theme minimal and it worked. But minimal dont have so many functions for the first page… i tried to use the code in another theme but it doesnt work. Like Dawn and DEBUT.

Can you help me please?

Hello @at21 I think it’s a sintaxis problem.

Maybe you need to try this:

{% if variant.options == “small”}

{% variant.options | replace: “small”, “S” %}

{% endif %}

Best,

JP

Hi.

How are you?

I used the code you shared with us in Minimal theme and it worked perfectly, but i would like to update for Dawn Theme, but it doesn’t work. Do you know any code that can help me?

Thanks

@Silverclouding This code is exactly what I was looking for, but for some reason I have an extra circle on each item. Do you know what I need to do to get rid of it?

@itsmek8i

Hi,

Is the position where you put the lines in the liquid code. Try to put it higher in the code. Try another

.

Best,

JP

1 Like

Thank you so much, I was able to go in and fix it!

can you explain in brief?
i couldn’t get your idea.

Can you elaborate on this? where do I paste the above snippet once created? I see you say between collection title and price but I’m not finding exactly where it needs to go… in assets? templates? layouts? snippets? just a little lost on where it should be placed

Hi @kristennrhodes

I put it in product-grid-item.liquid. In the line 213.

I’m still not finding it unfortunately. I’m using the Craft theme so i’m not sure if that has anything to with it. Only finding main collection product grid.liquid. Spent too many hours on this lol. I’m prob gonna just leave it be at this point

@kristennrhodes

Do you have the product-card-grid.iquid in your theme?

If you have it, you can place the code at the end, before the

like the image:

Hello Silverclouding,

I have the same issue with the Stiletto theme.
I was wondering if you could please help me too? I am a novice at Shopify, and I’m not tech savvy with coding. What you’ve done above is exactly what I’d like help with please.