SOLUTION: Excluding Discount Codes on Sale Items in Shopify

New Member
1 0 19


I imagine I am far from the only person to have this issue:  Let's imagine it's Black Friday or you offer things like a "Daily Deal" or whatever suits your specific store.  You also use discount codes, and this can become quite the problem.  Shopify SHOULD have a way to disable the use of coupon codes on items based upon many different conditions whether that be the item is already marked down, weight is over a certain amount, an item is tagged with a specific tag etc, the list could go on and on.  Unfortunately, they dont.  I spent some time on the phone with them today, and researched apps to no avail, what I came up with is a workaround that I don't think should really need to exist, but until Shopify gets it coded correctly to do what many of us need, this is what we'll need to do.

Below is a video of what to do, but the general jist is that Shopify will not allow you to EXCLUDE items from a discount based on any criteria, so, we have to reverse engineer it and INCLUDE only items that are NOT on sale.  The way we do this is to create a Collection that ONLY has items in it that are NOT on sale.  For this video I created a collection called "Not on sale" and tagged all items that were not on sale with the tag "normal".  So, any item that does NOT have the tag "normal" will disregard the coupon code.  When you mark an item down, or do not want it to have coupon codes applied to it, you'll simply REMOVE the tag "normal" and you're set.

The video was made under the assumption that you do not want to mark down any existing items that are on sale, those items would naturally have a "Compare at price" price and an actual "Price".  The video is quick, let me know if you have any questions or need any help, I think it can be used as a viable solution for now although I absolutely think Shopify needs to address this issue, it should be a core feature and I don't think would involve much coding on their end.

Shopify, you're more than welcome to reach out to me if you have any questions, I'd be happy to answer any questions you may have to help develop this feature.  Thanks!

Replies 124 (124)
122 0 66

Why is this post marked as outdated?

As far as I know, Shopiy still does not support for products 'on sale' to be excluded from being targeted by discount codes 😞

Owner @
Shopify Expert
10873 190 2177

Why is this post marked as outdated?

Old posts without any activity get marked that way automatically. You've revived it by making your post however.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. ★
Shopify Partner
1 0 4

The problem with this is I have to add every existing coupon and future discounts to the Not for Sale collection... Come on Shopify... GET WITH IT

122 0 66

This solution might work if you don't actively use your tags for anything else.

However, in my case, I use the tags for filtering, and I can't have a NORMAL tag shown in my filters list 😞

Shopify really needs to develop this feature.

Owner @
3 0 1

I am just starting out and this immediately solved an issue I had. Fantastic. Thank you.

Shopify Partner
13 0 4

Thank you!  I'm looking forward to trying this asap.

Do you know if this approach also works for products that are in bundles?  E.g. products that are discounted in a bundle by an app?



Shopify Partner
1 0 3

If you're not using the "Product Type" field for something like filters, there's a little easier way to do this.

  1. Create a collection called "Non-Sale Items"
  2. Assign the condion as "Product Type" and "is not equal to" and "Sale Item"
  3. Remove the collection from all sales channels (no need to show the collection)
  4. When you assign a sale price to a product, assign the product type "Sale Item".
  5. In your coupon, select the "Non-Sale Items" collection as the limiting condition.

And there you have it. Now, products can be placed on sale by assigning the compare at value and the type "Sale Item", and it will be excluded from the list of valid products (because it will not be found in the "Non-Sale Items" collection).

Some stores also run discounts on sale items to clear inventory. This kind of setup can work in reverse as well, simply by creating a "Sale Items" collection and setting the condtion to "Product type is equal to Sale Item". Then select that "Sale Items" collection in your coupon, and bam, you have a coupon that only applies to sale items.

Hope this helps (until Shopify decides to create exclusionary conditions).

NOTE: To update your product types en masse, you can:

  1. Export your products
  2. Sort your products by "Variant Compare At Price"
  3. Remove any record that does not have a value in the "Variant Compare At Price" column
  4. Assign "Sale Item" to the "Type" column for all remaining records.
  5. Import your spreadsheet.
New Member
4 0 0

1 million points to Emery.


Very clever mate, much appreciated.

New Member
2 0 14

It is such a travesty that Shopify STILL does not have this in place. This is one of THE most basic e-Commerce features. I shake my head. his company is so busy exploiting customers with Shopify Pay, Shopify Capital, Shopify Plus, ect that they can't even focus on Shopify, the original platform, and make sure it includes BASIC features. SHAME ON YOU SHOPIFY.

New Member
2 0 14

HOw you figured out a way to do this when the coupon isn't being applied to the whole store, but to a specific collection of products or even a specific product?

New Member
1 0 6

Still waiting for this feature. Please add shopify. I have 1700 products. I'm not categorizing them this way to make this functionality work.

Shopify Partner
96 3 15

Hello! We just developed an app for excluding tags from smart collections -


I think this will be relevant in solving the issue as you can create a collection that combines any smart collections while excluding any products which are tagged 'sale'.  Then you can create a discount code just for this non-sale collection. Also it auto-syncs so you don't have to worry when you update or add products.


Please try it out and let us know your feedback!

New Member
1 0 2
Shopify Expert
212 0 32
27 0 0

Hey mate,


Use something like smart tags to do the same thing automatically. I have set it up that as soon as its a discounted product it gets added to clearance. The smart tags auto assign 'notclearance' tag to everything that isn't in this collection automatically and a 'not on clearance' collection uses that tag to generate its products.


I have over 3500 products and it works a treat.




New Member
2 0 0

Hi Ben, 

Thanks for your helpful post. 

I can't figure out how to auto assign a negative condition. e.g. "auto assign 'notclearance' tag to everything that isn't in this collection automatically."

What app are you using? 


Thanks so much for your time, 


New Member
1 0 0

Do you know if there is a way to exclude variants within a product?  We have a necklace that comes in a few colors and only some of the colors are on sale. 

5 0 1

So, I may be missing something, but I have solved this by creating x2 tags : Discount-YES & Discount - NO 

Then tag all products with one or the other

then create 2 Collections (which are hidden on site - eg. not in any navigation) called Discount Yes & Discount NO (and set auto to include by the correct tag)

Set discount codes to Applies to Collection Discount YES


that's it


New Member
1 0 0

Why can't you just turn off all of your other coupon codes during the sale?