How can I customize product labels without an app?

Ess91
Shopify Partner
36 0 5

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 

Replies 2 (2)

suyash1
Shopify Partner
9134 1137 1485

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

To build shopify pages use pagefly You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
Paranormal story video using AI
Join me for beginner level training session

gr_trading
Shopify Partner
1687 141 174

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.

 

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee