Show Product Size Under Product Image

Solved
MainStreet
New Member
3 0 0

I wish to show the product size under the respective product image and price on the products page. How do I go about that? My website is marketplace.mainstreet.co.in and I want something similar to what justinreed.com has.

0 Likes
Guleria
Shopify Partner
1280 266 358

This is an accepted solution.

Hello MainStreet,

Use this code in all places where you want to display size.

      {% assign sizes = '' %}
      {% for variant in product.variants %}
        {% if variant.available %}
        {% assign sizes = sizes | append: variant.options[0] | append: '_' %}
       {% endif %}
      {% endfor %}
      
      {% assign sizesArr = sizes | split: '_' | uniq %}
      
      {% for size in sizesArr %}
        <span>{{ size }}</span>
      {% endfor %}

Note: You have to edit multiple files in order to display it in multiple places.
For further help you can reach out to me through email.
Thanks

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
0 Likes
MainStreet
New Member
3 0 0

Could you please guide me through the process of adding it to all sections I have to add it to?

0 Likes
MainStreet
New Member
3 0 0

Thank you, I've managed to add it and display the size. :D

0 Likes
stompdxb
New Member
2 0 0

Hi, can you please assist in doing the same for my shop? Urgent. Thanks

0 Likes
Guleria
Shopify Partner
1280 266 358

Hello ,

Yes sure, please follow code shared above code but if you are not aware about code then you can reach me through email and we'll discuss further.

Thanks

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
0 Likes
NoBL
New Member
3 0 0

Hello i am wondering if you could please guide me through this also. i run a clothing brand and would be great if my customers have this option, as it will make their life so much easier.

0 Likes
mariotorres
Excursionist
11 1 3

Hello,

It worked for me, but is there any way of also showing the out os stock products with strikethrough?

 

Thank you

0 Likes