A Shopify store owner using the Dawn theme successfully added a ‘new’ badge to product cards on collection pages but struggled to implement the same badge on individual product pages.
Working Solution:
The user needed to modify the product template code from card_product.tags to product.tags. Two community members provided similar solutions:
Locate sections/main-product.liquid in the theme editor
Insert the badge logic near the price display area:
Style the badge in CSS with background color, padding, and border-radius
Implementation Details:
The user attempted to add the code within the price block section of their product template. The badge checks for products tagged with ‘חדש’ (Hebrew for ‘new’) and displays a light blue badge.
Status:
The discussion appears resolved, with one responder asking for confirmation if further assistance is needed after a solution was marked.
Summarized with AI on November 2.
AI used: claude-sonnet-4-5-20250929.
hi i am trying to add a ‘new’ badge to my shopify store ( i work with dawn theme)
i manage to add the ‘new’ badge to the card product in the collection page and carusal
but i didnt succes to add it to the product page / main-product
even try to add it to the price liqud where it shows the badge of discount
this is the code i am using for the collection page that work:
{% if card_product.tags contains ‘חדש’ %} חדש
{% endif %}
To add the ‘new’ badge to the product page in your Dawn theme, you need to modify the code in the main-product.liquid (or similar template file) to check for the tag and display the badge.
Here’s how you can do it:
Locate the Product Template File:
In your Shopify admin, go to Online Store > Themes > Edit Code.
Open the file sections/main-product.liquid (or similar, depending on your theme version).
Add the Badge Logic:
Search for where the price is displayed or near the discount badge code.
Insert your badge condition where appropriate. For example:
{% if product.tags contains 'חדש' %}
חדש
{% endif %}
Style the Badge:
Go to Assets > base.css (or theme.css) and add styling for .badge if not already defined: