Implementing prominent discount / sale badges on your product cards immediately signals savings, heightens shopper excitement, and drives decisive action, unlocking several strategic advantages:
Badge Visibility
• Draws instant attention to discounted items, breaking visual monotony of product grids.
• Uses color contrast and badge shapes to spotlight savings without overwhelming imagery.
• Reinforces promotional messaging by pairing badge text (“-25%”, “Sale”) with brand palette.
• Maintains clarity at all sizes SVG or high resolution PNG badges stay crisp on retina displays.
Shopping Experience
• Helps shoppers quickly identify deals, shortening the decision making journey.
• Reduces cognitive load by visually grouping discounted products in a crowded catalog.
• Provides clear value cues that build shopper confidence and perceived transparency.
• Supports accessibility when paired with ARIA labels, ensuring screen reader clarity.
Conversion Impact
• Raises click through rates by tapping into deal seeking behavior and urgency bias.
• Increases average order value as customers add discounted items while browsing full price goods.
• Lowers bounce rates by keeping bargain hunters engaged within your store.
• Enhances perceived scarcity when combined with countdowns or limited-stock messaging.
Seamless Integration
• Simple to implement with a Liquid conditional and lightweight CSS no app overhead.
• Easily customized for seasonal campaigns (e.g., “Black Friday”, “Summer Sale”) via metafields.
• Compatible with most Shopify themes; can be injected via CSS pseudo elements for zero DOM bloat.
• Minimal performance impact vector badges load instantly and cache efficiently across pages.
🔎 The Code to find : price.liquid
products.product.on_sale
The Code to replace it with :
-{{ compare_at_price | minus: price | times: 100 | divided_by: compare_at_price }}% OFF🔎 The second Code to find : card-product.liquid
products.product.on_sale
The Code to replace it with :
-{{ card_product.compare_at_price | minus: card_product.price | times: 100 | divided_by: card_product.compare_at_price }}% OFF.card__badge .badge,
.price .price__badge-sale,
.product .badge,
.product-information .price__badge-sale {
border-radius: 1.3rem;
background: linear-gradient(120deg, /* The values below this line are the badge colors */
#ffd1d1 0%,
#fd8585 35%,
#ee0979 100%);
font-weight: 700;
border: none;
color: white;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
text-transform: uppercase;
letter-spacing: 0.05em;
font-family: var(--font-body-family);
transform-origin: left center;
margin: 0;
display: inline-block;
line-height: 1.1;
}
.card__badge .badge,
.price .price__badge-sale {
padding: 0.5rem 1.3rem !important;
font-size: 1rem !important;
transform: scale(1.3) translateY(15%) !important;
}
.product .badge,
.product-information .price__badge-sale {
padding: 0.45rem 1.3rem !important;
font-size: 0.95rem !important;
transform: scale(1.5) translateY(15%) !important;
margin-bottom: 0.85rem;
transform-origin: left top;
}
.card__badge .badge:hover,
.price .price__badge-sale:hover {
transform: scale(1.3) translateY(calc(15% - 2px)) !important;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.product .badge:hover,
.product-information .price__badge-sale:hover {
transform: scale(1.5) translateY(calc(15% - 2px)) !important;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.card__badge .badge::after,
.price .price__badge-sale::after,
.product .badge::after,
.product-information .price__badge-sale::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
rgba(255,255,255,0) 0%,
rgba(255,255,255,0.3) 50%,
rgba(255,255,255,0) 100%
);
transform: skewX(-20deg);
transition: all 0.75s ease;
}
.card__badge .badge:hover::after,
.price .price__badge-sale:hover::after,
.product .badge:hover::after,
.product-information .price__badge-sale:hover::after {
left: 100%;
}
.card__badge,
.product .badge-container {
overflow: visible !important;
}
.price .price__badge-sale {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
.product-information .price__badge-sale {
position: relative;
}
.card__information {
margin-top: 0.85rem;
}
.price--on-sale .price__container {
position: relative;
}
@media screen and (max-width: 749px) {
.card__badge .badge,
.price .price__badge-sale {
padding: 0.45rem 1.1rem !important;
font-size: 0.9rem !important;
}
.product .badge,
.product-information .price__badge-sale {
padding: 0.4rem 1.1rem !important;
font-size: 0.9rem !important;
}
}Without position adjustments :
.card__badge .badge,
.price .price__badge-sale,
.product .badge,
.product-information .price__badge-sale {
border-radius: 1.3rem;
background: linear-gradient(120deg, /* The values below this line are the badge colors */
#ffd1d1 0%,
#fd8585 35%,
#ee0979 100%);
font-weight: 700;
border: none;
color: white;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
text-transform: uppercase;
letter-spacing: 0.05em;
font-family: var(--font-body-family);
margin: 0;
display: inline-block;
line-height: 1.1;
margin-left: 10px !important;
margin-right: 10px !important;
}
.card__badge .badge,
.price .price__badge-sale {
padding: 0.5rem 1.3rem !important;
font-size: 1rem !important;
transform: scale(1.3) !important;
}
.product .badge,
.product-information .price__badge-sale {
padding: 0.45rem 1.3rem !important;
font-size: 0.95rem !important;
transform: scale(1.5) !important;
}
.card__badge .badge:hover,
.price .price__badge-sale:hover {
transform: scale(1.3) !important;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.product .badge:hover,
.product-information .price__badge-sale:hover {
transform: scale(1.5) !important;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.card__badge .badge::after,
.price .price__badge-sale::after,
.product .badge::after,
.product-information .price__badge-sale::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
rgba(255,255,255,0) 0%,
rgba(255,255,255,0.3) 50%,
rgba(255,255,255,0) 100%
);
transform: skewX(-20deg);
transition: all 0.75s ease;
}
.card__badge .badge:hover::after,
.price .price__badge-sale:hover::after,
.product .badge:hover::after,
.product-information .price__badge-sale:hover::after {
left: 100%;
}
.card__badge,
.product .badge-container {
overflow: visible !important;
}
.price .price__badge-sale {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
.price--on-sale .price__container {
position: relative;
}
@media screen and (max-width: 749px) {
.card__badge .badge,
.price .price__badge-sale {
padding: 0.45rem 1.1rem !important;
font-size: 0.9rem !important;
}
.product .badge,
.product-information .price__badge-sale {
padding: 0.4rem 1.1rem !important;
font-size: 0.9rem !important;
}
}
