Shopify themes, liquid, logos, and UX
Hello,
I would like to add discount percentages and numbers on the product page.
Any suggestions on how to do this would be appreciated.
Thank you
Here's my web: www.vedec.in
That doesn't really seem like what they're asking for, based on the screenshot in their original post.
As shown, the price of the product on the PDP is already discounted, without a specific coupon being required.
Hi Arohan, is this a markdown you've applied using the "compare at price"? Or an automatic discount?
It looks like "compare at price," so most likely, you'll need to edit your "price.liquid" file (or whatever product prices are called in your theme), and dynamically calculate the discount percentage using Liquid filters.
Hi @Arohan , You can follow my instructions!
Step 1 : Go to shopify admin -> online store -> theme -> Edit Code
Step 2: Go to price.liquid or the file includes your price
Step 3: Add this code after your sale price like this
{{ product.compare_at_price | minus: product.price | times: 100 | divided_by: product.compare_at_price | replace: '0,', ''| append: "%"}}
Result:
I hope these instructions will help you. If they are helpful, don't forget to like and mark as the solution.
Have a nice day sir!
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
Unfortunately, the price.liquid does not exist in the prestige theme. Where can I insert this code?
Hey 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, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025