Personalized checkout and custom promotions with Shopify Scripts
Tried to add meta field with size guide on my products. But the same size guide shows up on ALL of my products. For example....there is suppose to be one size guide for tshirts and a different one for hoodies. But when i add it on one tshirt then it ends up on every product. Even the on the pants. I was told its a bug in the theme. Can someone explain to me step by step how i remove this bug???
Hey @SofiaN1!
To remove the bug in your theme that causes the same size guide to show up on all products, you'll need to make some changes to your theme code. Here are the steps:
{% if product.metafields.size_guide %}
{{ product.metafields.size_guide }}
{% endif %}
{% if product.type == 'T-shirt' and product.metafields.tshirt_size_guide %}
{{ product.metafields.tshirt_size_guide }}
{% elsif product.type == 'Hoodie' and product.metafields.hoodie_size_guide %}
{{ product.metafields.hoodie_size_guide }}
{% endif %}
Note: Make sure to back up your theme code before making any changes.
I hope this helps! Let me know if you need further assistance.
Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi and thank you. However, there are not any product.liquid or product-template.liquid. I have checked through every section on theme, even made a search. I cant find any product details. There are not any metafields there either.
There is not any specific product details in theme. So i cant find anywhere to change this coding. The metafields are not shown in theme at all.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024