Shopify themes, liquid, logos, and UX
Hello,
can someone tell me how to add this modification to the product when its on sale?
How it looks now:
How it should look:
Im using the Brooklyn theme: aliudclothing.com
Thank you!
Kim
Hi @KimGottwald
Go to your Online store > Themes > Edit code > open product-grid-item.liquid, find this line of code
{{ product.price | money_without_trailing_zeros }}
Replace it with this code
<span style="text-decoration: line-through;">
{{ product.compare_at_price | money_without_trailing_zeros }}
</span>
<span style="color: red;">
{{ product.price | money_without_trailing_zeros }}
</span>
Save your file
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Thank you, sadly also the normal prices are now red, how can I change that?
Please update previous code to this
{% if on_sale %}
<span style="text-decoration: line-through;">
{{ product.compare_at_price | money_without_trailing_zeros }}
</span>
<span style="color: red;">
{{ product.price | money_without_trailing_zeros }}
</span>
{% else %}
{{ product.price | money_without_trailing_zeros }}
{% endif %}
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Please help.
Please update code like this
{% if on_sale %}
<span style="text-decoration: line-through;">
{{ product.compare_at_price | money_without_trailing_zeros }}
</span>
<span style="color: red;">
{{ product.price | money_without_trailing_zeros }}
</span>
{% else %}
{{ product.price | money_without_trailing_zeros }}
{% endif %}
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025