How to create a badge 'NEW' - Craft Theme

How to create a badge 'NEW' - Craft Theme

bellezaboutique
Visitor
1 0 0

I have a website using the Craft theme from Shopify.  At the moment I have 2 automatic badges.  SALE and SOLD OUT.   

 

I'd like add another one called NEW on our new arrivals products.   

 

Thank you in advance!

 

Anna 

Reply 1 (1)

Dan-From-Ryviu
Shopify Partner
9136 1828 1863

Hi @bellezaboutique 

Please add a tag that is new for those products then go to your Online store > Themes > Edit code > open card-product.liquid, find this line of code around line 122

<div class="card__badge {{ settings.badge_position }}">

Add this code under the above code. You can change color of badge by change color in background code 

{% if card_product.tags contains 'new' %}
    <span class="badge badge--bottom-left" style="background: red;">NEW</span>
{% endif %}  

Screenshot 2024-01-23 at 10.32.52.png

 

 

- Helpful? Like and Accept solution! ‌Support me: Buy coffee
- Ryviu - Reviews & QA app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.