Say you mark a hoodie down from $60 to $40. That’s a decision. You looked at the margin, decided what you could give, and priced it.
Then someone applies WELCOME15 at checkout and takes another $6 off, and your decision quietly stops mattering. Multiply that by every sale item and every live code and you get the number that surprises most merchants when they finally measure it. Discounts landing on already-discounted products are usually the single biggest line in their unintended discount loss.
Why Shopify allows this
To Shopify, your sale price is just the price. The compare-at field draws the strikethrough on your storefront, but discount codes don’t look at it. A 15% code means 15% off whatever the price happens to be, marked down or not.
There’s no native setting to change this. Nothing in the discount editor says “exclude sale items” or “skip sale items,” and merchants have been asking Shopify for one for years.
The native workaround: a full-price collection
You can get most of the way with a collection and no app.
- Create an automated collection with one condition: Compare-at price is empty. Every product without a compare-at price lands in it, and products leave on their own when you put them on sale.
- Open the discount, and where it asks what the code applies to, choose specific collections and pick that one.
A code set up this way never touches a marked-down product. If you run a couple of codes and build them all yourself, stop here. You don’t need anything else.
Two things to know. A product with even one marked-down variant drops out of the collection entirely, so its full-price variants lose the code as well. And a compare-at price of $0.00 isn’t empty to Shopify, so clear the field instead of zeroing it.
It gets harder as the store grows. Each existing code has to be opened and edited by hand, which is fine for five codes and miserable for five hundred. Amount-off-order codes and free shipping codes can’t be limited to a collection at all. And the codes your email, loyalty, or referral app creates aren’t yours to configure, so they keep landing on sale items whatever you do.
For those cases the fix has to happen at checkout, which is where PromoLock works. It gives you two ways to do it. You can reject codes on carts with sale items, which covers every code you have. Or you can build the discount so it skips the sale items and still takes its percentage off everything else in the cart.
First, know what “on sale” means
Everything below runs on one definition: a product is on sale when its current price is below its compare-at price. $40 price, $60 compare-at, that’s a sale item. If the compare-at is empty or equal to the price, it’s not.
This has a practical consequence. If you end a markdown by raising the price but leave the old compare-at sitting above it, that product still counts as on sale. Clearing compare-at when a sale ends is worth making a habit.
The store-wide fix: block codes when sale items are in the cart
In PromoLock’s Controller there’s a switch called Lock Discount Usage On Sale Items. It applies to every code entered at your checkout, including codes created by other apps and the old ones you’d otherwise be editing one by one. Nothing about the codes themselves changes. The switch has two modes.
Block if cart has any sale item. One marked-down product anywhere in the cart and codes stop working. Maximum protection, but blunt: a customer buying one clearance sock with $200 of full-price stock also loses their code, and that’s a support email.
Block when sale items exceed % of cart total. This is the one most stores want. Set the threshold to 50 and a mostly-full-price cart keeps its code, while a cart that’s mostly markdowns doesn’t. The percentage is measured on money, not item count, so it maps to what the cart costs you.
Either way, you write the rejection message the customer sees. “Discounts can’t be used on sale items” does fine. It’s honest, and an honest message gets you fewer confused emails than a mystery error.
Sale items are one case of a bigger job. The same Controller can block discount codes by name, by pattern, or across the whole store.
The per-discount fix: codes that skip sale items
Discounts you create through PromoLock come with an On-sale items guard, and a new discount ships with it set to Exclude sale items. The discount never applies to marked-down lines. No blocking, no error, the code just doesn’t touch those items.
The same guard has a softer setting called Best price only. The code still works on sale items, but the sale’s markdown counts toward it, so the customer gets whichever saves more and never both. A 20% code on a $60 item already marked down to $40 gives nothing extra; a 50% code would take it to $30. Useful when “20% off” is a promise you want to keep to the letter, including on sale items, without ever paying out on top of a markdown. There’s a full post on it.
If you only ever ran PromoLock-created discounts, this alone would close the leak. The Controller lock exists for everything else: your old native codes, the referral app minting unique codes, whatever’s still floating around inboxes from 2024.
Or don’t block at all
There’s a third option that deserves its own post, because for some stores it converts better: let codes work on sale items, at a lower rate you chose. Full-price items get 20%, sale items get 5%, one code, nobody’s checkout errors. If blocking feels too aggressive for your brand, read how to control discounts on sale items before deciding.
Questions that come up
Does this work on discount codes I already created? Yes, and that’s the main reason stores use the lock over the collection method. It checks the cart at checkout, so a code from three years ago is treated the same as one made this morning.
What about free shipping codes? The lock rejects any code typed at checkout, free shipping included. If you’d like free shipping to survive on sale carts, leave the lock off and write a custom rule in its place: watch all codes except your shipping code, add the condition Cart has sale item, and set the action to Block.
Does it stop automatic discounts? No. An automatic discount never passes through the code box, so there’s nothing for the lock to reject. Automatic discounts you build in PromoLock carry the same On-sale items guard as codes do. For a native one, the full-price collection above is the way.
Can a code skip the sale items and still work on the rest of the cart? With the lock, no. It decides for the whole cart. A discount built in PromoLock with Exclude sale items does exactly that, discounting the full-price lines and leaving the marked-down ones alone.
Check what it was costing you
PromoLock’s analytics has a report for exactly this, sale-item loss computed from your order history. Most merchants who look are surprised. Turn the lock on, watch that line flatten over the next month, and you’ll know precisely what the hoodie math was doing to your margin.