How to prevent discount codes from applying to items already on special

Topic summary

Core Issue:
Shopify discount codes apply to products with sale prices (compare-at pricing), even though they correctly exclude items with automatic discounts. The original poster seeks a way to prevent codes from stacking with manually-set sale prices.

Official Workaround (2021):
Shopify support recommends creating a manual collection called “Eligible for discount” containing all non-sale products, then restricting the discount code to only apply to that collection. This requires manually maintaining the collection as products go on/off sale.

Community Concerns:
Multiple users express frustration that this manual approach is time-consuming and impractical for stores with frequently changing sales. They request a built-in “exclude sale items” option.

Improved Method (2023):
One user suggests creating an automated collection that excludes products where “Compare at Price” is not empty. This automatically removes/adds products as sale prices are set or cleared, reducing manual maintenance.

Variant Limitation:
The automated collection method may not work properly when only specific variants have sale pricing.

Third-Party Solution:
Apps like Alpha Sale offer discount management with built-in options to exclude sale products and prevent discount stacking, though this requires migrating discounts outside Shopify’s native system.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Hi Team,

I’m trying to create a discount code that applies storewide excluding already discounted items. However when I trialed it, the discount code also worked on products already on special.

The discount code did not work for products with automatic discounts which I set up through shopify (eg buy 2 get 1 free) which is good however, the discount code worked for items we already have on sale (eg items with a compare at price)

How do I make a discount code which doesn’t apply to items already on special (eg with a compare at price)

Hope that makes sense and thanks so much in advance!!

Boni

Hi @Boni ,

June here from Shopify. Thanks so much for your question! I’d love to chat about your options.

As you’ve said, by default a discount code cannot be applied to an order that already qualifies for an automatic discount - but if you’ve manually set a sale price, the same checkout rules don’t apply.

The best way around this is to limit the products that are eligible for that discount code in the first place. To do this:

  • Create a manual collection called “Eligible for discount”.
  • Add all of your products to this collection, except for your sale items. The easiest way to do this may actually be to first add all of your products to the collection, then manually remove your sale items. Check out this video on using your Products page bulk edit options to save yourself some time - and let me know if you run into any questions!
  • Create a new discount code, or edit an existing one.
  • In the section Applies to, choose Specific collections, then search for your collection, “Eligible for Discount” (see below).

Going forward, only products that belong to your “Eligible for Discount” collection (i.e. all non-sale items) will be, well, eligible for a discount!

Although I think this is a solid workaround, I’ve shared the feedback with our developer team that it would be even better to introduce a new option to our discount page’s Applies to section such as All products but - to save us the step of creating our collection. I can’t guarantee if or when we might see a change like this come to life but I think it would be an excellent fit for what you’re describing. So thanks again for bringing this up!

For more insights on making the best use of your discount codes, check out this guide which includes steps to promote them via a shareable link.

Take care!

1 Like

You need to fix this issue better than this. People don’t have time to continuously mess with products that go on sale and off sale.

15 Likes

Is there a better way in 2023, besides changing existing discounts & collections?

6 Likes

Yes. I create a collection of “All Products” and then eliminate the ones that have a “Compare to Price” set… Essentially selecting all products where “Compare at Price” is empty:

…then setting sale prices removes them from the “All Products” collection (and adds them back in) as necessary.

1 Like

100%
Why would Shopify not have an already existing rule that simply excludes any item with a “sale” price.

Hi June,

It’s been over 3 years - is this still the solution? It doesn’t seem to work when only certain variants are on sale. It seems that if any of the variants don’t have a compare-at price, then it includes them in the collection (even though they don’t show up visually in the collection).

See my method below. By excluding products that have a “Compare To” price set, you are able to automatically apply or remove the discount to only regularly-priced products relatively easily.

While there’s still no elegant built-in solution to exclude sale products from Shopify discounts, there are apps that allow you to create discounts similar to Shopify’s but with additional exclusion settings.

For example, if you create discount codes via Alpha Sale, you’ll have options to:

  • Prevent coupons from applying to sale products entirely

  • Ensure only the largest discount applies when multiple discounts are eligible

This solution may not be ideal if you have hundreds of Shopify discounts that you’d prefer not to migrate to an external app. However, using an app also comes with extra benefits, like extra product and client targeting flexibility.