Show Product Size Under Product Image

Solved
Highlighted
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
Highlighted

Success.

Shopify Partner
817 167 188

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.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
Highlighted
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
Highlighted
New Member
3 0 0

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

0 Likes