Add custom badges based on tags like "best seller" and "New" to Empire Template

Add custom badges based on tags like "best seller" and "New" to Empire Template

Kimjik
Tourist
4 0 4

I need some help adding custom badges to product items in the Empire template. They would ideally be based on tags. I tried adding the tag:__label:Best Seller but had no results. Any help would be appreciated. 

Replies 6 (6)

Zworthkey
Shopify Partner
5581 642 1578

@Kimjik 

@By custom code you can add it. Easily, let me know if you want to know.

Thank you

KetanKumar
Shopify Partner
37094 3645 12054

@Kimjik 

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

JoesIdeas
Shopify Partner
2419 224 645

@Kimjik there are a couple steps to do this:

 

1. Add the tag to the customer

2. Upload the badge to the Assets folder

3. Add the theme code to show the badge where you want

 

An example for #3, say you want to add the badge to the product cards in collection pages, you would start with the Templates/collection.liquid file in your theme editor and read the code there to see the files included. Then read each file to find the snippet that shows your product cards (it's usually something like Snippets/product-card.liquid or product-grid.liquid).

 

Once you've identified the file where the code is, you can add an image tag with the badge, something like:

{% if product.tags contains "Best Seller" %}
<img src="{{ "badge-best-seller.png" | asset_img_url: "100px" }} class="collection-badge" />
{% endif %}

 

Then of course you'd style the CSS for the .collection-badge class to have it show how you'd like.

 

Do the edits on a duplicate theme so you don't affect your live theme - this guide will help with that + identifying elements to edit the CSS: https://speedboostr.com/how-to-safely-edit-your-shopify-theme.

 

If you get stuck or prefer to hire a professional Shopify developer, feel free to contact my team at speedboostr.com/contact.

 

Good luck.

• Creator of Order Automator [auto tag, fulfill, connect FBA, order jobs]
• Co-Creator of Product Automator [suite of features for products / collections]
• Shopify developer for 10+ years, store owner for 7 years
• Blog: Shopify Tips, Guides, and Automation Tools

fadi_yousif
Shopify Partner
345 43 67

I created a tutorial for this, not specifically tailored to the Ride theme, but you may find it helpfulhttps://youtu.be/0OjLBnyTyus?si=DxZODP2buUg0cUcc

Freelance Shopify Developer


Did I help? Leave a tip!

KabirDev
Shopify Partner
248 61 71

Anyone looking for adding a badge or label in 2024, you can check this video out. I hope it helps.

- Control payment methods visibility at checkout by KlinKode PayRules app.
- Contact me directly at shahriar@kabirdev.com

gr_trading
Shopify Partner
1929 145 201

Hi @Kimjik ,

 

Please refer the below video to enable multiple badges on product card.

 

 

Hope this will help others too.

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