Shopify themes, liquid, logos, and UX
Hey, how can I change the on sale badge to say the amount saved instead please?
my website is: doorstepdrip.com
It currently looks like this:
im hoping to get it to look like this
any help would be much appreciated
thanks 🙂
Hi, @doorstepdrip
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find Price.liquid File:
press ctrl+f past this {{ 'products.product.on_sale' | t }}
Replace {{ 'products.product.on_sale' | t }} with the following code:
-{{ compare_at_price | minus: price | times: 100 | divided_by: compare_at_price | round }}% OFF
Go to your Online store > Themes > Edit code > open card-product.liquid file, and find this line of code.
{{- 'products.product.on_sale' | t -}}
Replace with this code.
{%- assign savings = card_product.compare_at_price | minus: card_product.price -%}
Save £{{ savings | money_without_trailing_zeros }}
- Helpful? Like and Accept solution! Or Support me: Buy Coffees
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
The code you provided will say 0 (local currency) saved. With the following code it does show the amount saved with local currency:
{%- assign savings = product.compare_at_price | minus: product.price -%} {% if savings > 0 %} Save {{ savings | money_without_trailing_zeros }} {% endif %}
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024