Guides / Shopify discount code applies to the sale price, not the compare-at price: how to fix it

Shopify discount code applies to the sale price, not the compare-at price: how to fix it

By the MRP Discount team · Updated 11 November 2026

Short answer. Shopify's own discount codes always take their percentage off the price the customer is charged, which is your sale price. The compare-at price is only the crossed-out number. To make a code come off the compare-at (original) price, either put every price back to the original before the sale or use an app that reads the compare-at price, such as MRP Discount.

Why it happens

Shopify keeps two prices on a product. The price is what the customer pays. The compare-at price is the higher, crossed-out price (stores in India usually keep the MRP here). Discount codes, automatic discounts and checkout all work from the first one.

So when a product is already on sale, a code goes deeper than its label says. An example with a compare-at price of $100 and a sale price of $80:

Normal Shopify 40% codeMRP Discount 40% code
Compare-at price$100$100
Sale price$80$80
40% comes off$80$100
Customer pays$48$60
Real discount off the original52%40%

These are example prices. On your store the gap depends on how far each product is already marked down.

How to check which price your code uses

  1. Pick one product that shows a crossed-out compare-at price.
  2. Add it to the cart and apply your code at checkout.
  3. If the total is the sale price minus your %, the code uses the sale price. If it is the compare-at price minus your %, it uses the compare-at price.

Three ways to fix it

1. Put prices back to the original before the sale. Copy each compare-at price into the price field, run a normal code, and change it all back after. It works and costs nothing. It also means editing every product twice, and shoppers see your prices jump.

2. Keep sale items out of the code. Limit the code to a collection of products with no compare-at price. Sale items then get no extra discount at all. Our guide on excluding sale items from a discount code has the steps.

3. Use a code that reads the compare-at price. This is what MRP Discount does (we make it). The code takes its % off the compare-at price, and your store keeps showing the same prices:

  1. Install MRP Discount from the Shopify App Store.
  2. Open the app in your Shopify admin and choose Create discount.
  3. Type a code, such as FLAT40, and the percentage: 40%.
  4. Choose what it covers: all eligible products, chosen collections or chosen products. Add a minimum purchase, a usage limit, one use per customer or start and end dates if you want them.
  5. Save. The code also shows in Shopify's own Discounts page, next to your other codes.
  6. Test it: add one sale item to the cart, apply the code, and check the total is the compare-at price minus 40%.

How the options compare

Edit prices by handShopify's own discountMRP Discount app
The % comes offWhatever price you setThe sale priceThe compare-at price (MRP)
Same real % on every productYes, if every edit is rightNo, products already on sale go deeperYes
Store prices changeYes, twice: before and afterNoNo
Work before and afterEdit every product, then undo itA few minutesA few minutes
CostFree, but your timeFree, built into Shopify$4.99 a month, 7 days free

If none of your products has a compare-at price, you don't have this problem: Shopify's own code already takes the % off the full price.

Questions store owners ask

Can Shopify's built-in discounts use the compare-at price?

No. Shopify's discount codes and automatic discounts work out the percentage on the selling price. The compare-at price is only shown as the crossed-out price.

Why does my 40% code give more than 40% off?

Because the 40% comes off a price that is already reduced. With a compare-at price of $100 and a sale price of $80, a 40% code leaves $48, which is 52% below the original price.

Does Shopify Plus fix this?

Not without custom code. On any plan, a developer can build a custom discount with Shopify Functions that reads the compare-at price, which is how apps like MRP Discount work. Then you look after that code yourself.

What happens to a product with no compare-at price?

With MRP Discount, its normal price is treated as the original, so it gets the full % off, just like a normal code.

Is MRP Discount the only app that does this?

No. A few other apps on the Shopify App Store also work from the compare-at price. We compare some of them on this page.

Related answers

Run your next sale without touching a price.

Install it, make one code, and check it in your own checkout. The first 7 days are free.