Skip to main content

Command Palette

Search for a command to run...

How to Show DISCOUNT on card product ?

Published
1 min read
R

Hey, I’m Rakeshraj Mahakud, a passionate full-stack developer and digital problem solver from India. I specialize in building high-performance web applications and custom Shopify solutions that are not only functional but user-centric.

I enjoy turning complex challenges into clean, scalable code—whether it’s crafting fast-loading storefronts, designing interactive UIs, or building backend logic that just works.

When I’m not coding, you’ll find me exploring the intersection of design and development, leveling up on modern tech stacks, or documenting what I learn to help the dev community.

🔧 Tech I love working with:

JavaScript, TypeScript, Liquid, React, Next.js, Node.js, Express, Shopify theme & app development ,Firebase, MongoDB, REST APIs, GSAP, Splide, Tailwind CSS

💡 On Hashnode, I write about Web development tips & real-world problemsShopify dev hacks & theme customization Performance optimization & clean UI/UX Dev tools, productivity, and beyond

TO display discounts on product cards in the down theme we need to replace the default code with the following code.

Find the following line in card-product.liquid file.

{{- 'products.product.on_sale' | t -}}

replace the following code with it.

{{card_product.compare_at_price | minus: card_product.price | times: 100 | divided_by: card_product.compare_at_price }}% OFF

More from this blog

Rakeshraj Mahakud

36 posts

How to Show DISCOUNT on card product ?