A user wants to add a green “Vente” (Sale) badge next to the product price on their Shopify store using the Impulse theme.
Solutions Provided:
CSS-only approach: Multiple contributors shared CSS snippets that add the badge using the :after pseudo-element on .product__price.on-sale or by styling .product__price-savings. These can be added to Theme Settings > Custom CSS or product page section Custom CSS.
Liquid template modification: One suggestion involves editing main-product.liquid or product-template.liquid files to conditionally display the badge when compare_at_price > price, combined with CSS for styling.
Current Issue:
The original poster reports that while the CSS solution displays correctly in the theme customizer, they cannot save the theme after adding it to Custom CSS. The discussion remains open with no resolution to this saving issue yet provided.
Summarized with AI on October 30.
AI used: claude-sonnet-4-5-20250929.
I’m busy doing some CRO and I’d like to add a green Sale badge saying ‘‘Vente’’ behind the price on my product page as displayed in the example below. Though I cant seem te figure out how to make that work. Can anyone help me out with the coding, please?
Thank you, in the theme customizer it looks exactly like what I had in mind! But when added to the Custom CSS, but it wont let me save the theme after I added it.
Go to your Shopify Admin
Navigate to: Online Store > Themes > Actions > Edit Code
Find the main-product.liquid or product-template.liquid file
Locate the price section, usually found inside product-price.liquid or directly in product-template.liquid
Modify the code to insert the sale badge
Insert this before or inside the price container:
{% if product.compare_at_price > product.price %}
Vente
{% endif %}