Shopify themes, liquid, logos, and UX
Hi,
I was wondering if it was possible to do product labels and also customise them without the need for an app. I'm trying to use the tags field in the product page but it does not seem to pick up. I'm trying to create things like "Bestseller" "Last Chance" etc. I'm using the Testament Theme.
Thank you
you need to add tag to products
- then go to product grid item.liquid template
- go to the location where you want this label to appear
- need to put code to check if product has this particular tag
- if tag is present then show the particular label related to it
- then style it using css as per the need
Hi @Ess91 ,
You can customize your badge using tags or using metafield.
Then style the badge as per requirement.
for tags refer the below code
{% assign productTags = product.tags | join: ', ' %}
<!--Now Check for the desired tag name-->
{% if productTags contains 'Show_Size_Chart' %}
Okay.. I found the tag
{% else %}
<!--Tag not found 😞 -->
{% endif %}
If you are willing to hire a developer would be happy to serve you details in BIO.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024