You can add custom labels such as “New”, “On Sale”, and “Free Shipping” by using product tags in the Dawn theme. Here’s how you can do it:
Steps to Add Custom Labels Based on Product Tags
Go to your Shopify Admin → Products
Edit the product and add the relevant tags like:
- New
- On Sale
- Free Shipping
Modify the Dawn theme’s product card
In Online Store → Themes → Customize, click Edit Code.
Open snippets/card-product.liquid.
Add this code inside the product card template (usually near the product title or image):
{% if product.tags contains 'New' %}
New
{% endif %}
{% if product.tags contains 'On Sale' %}
On Sale
{% endif %}
{% if product.tags contains 'Free Shipping' %}
Free Shipping
{% endif %}
Style the labels in base.css or component-card.css:
.product-labels {
position: absolute;
top: 10px;
left: 10px;
display: flex;
gap: 5px;
}
.label {
background-color: #ff0000;
color: #fff;
padding: 5px 10px;
font-size: 12px;
font-weight: bold;
border-radius: 4px;
}
.new { background-color: #27ae60; } /* Green for New /
.sale { background-color: #e74c3c; } / Red for On Sale /
.free-shipping { background-color: #f39c12; } / Yellow for Free Shipping */
If a product has the “New” tag, it will display a green “New” label.
If a product has the "On Sale" tag, it will show a red “On Sale” label.
If a product has the “Free Shipping” tag, it will show a yellow “Free Shipping” label.
I hope it will work for you @Koincestore