Shopify themes, liquid, logos, and UX
I'm using the Luxe theme. Can someone guide me on how to display the percentage discount on every product, including product cards and product pages, instead of just showing 'Sale'?
Website: https://flyuhpmj48fgyij1-86107750704.shopifypreview.com
Hi @Sivadarshan
If you don't mind, please share the collab code so I can request access to your theme so I can check and do it for you.
- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- 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.
- Enjoy 1 month of Shopify for $1. Sign up now.
Hi @Sivadarshan
The Luxe theme doesn’t have a built-in option to show the percentage discount on product cards, but it does support displaying it on product pages. Here are 2 simple steps to enable it on your product pages:
Step 1: Go to Customize in your Shopify admin and navigate to the Product page section.
Step 2: Select the Price block on the left side, then in the sidebar on the right, enable Show percent discount
(Screenshot example: [link])
Save your changes and check your product pages to see the percentage discount displayed.
Let me know if you need further help!
Best,
Felix
@GloboApps-Felix Thanks for the help, But I also want in all collection pages too
Are you using an app to manage the sale prices, @Sivadarshan? If so — and if you'd rather not get your hands dirty — try reaching out to the app’s support team.
At Alpha Sale, we handle this kind of request all the time, and we do it free of charge 😊
Let us know if we can help!
Hi @Sivadarshan
To display the percentage discount on every product in the Luxe theme—both on product cards and product pages—instead of just showing “Sale,” you’ll need to add some custom code to your theme’s Liquid templates and update the styling.
Here’s how it works:
We calculate the discount percentage by comparing the original price and the sale price, then display that value dynamically wherever you want.
{% if product.compare_at_price > product.price %} {% assign discount = product.compare_at_price | minus: product.price %} {% assign discount_percentage = discount | times: 100 | divided_by: product.compare_at_price | round %} <span class="discount-percentage">-{{ discount_percentage }}%</span> {% endif %}
.discount-percentage { background-color: #e63946; color: #fff; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 0.9em; }
This snippet will show a red badge with the percentage off whenever the product is on sale.
Let me know, if you have any questions!
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025