SOLUTION: Excluding Discount Codes on Sale Items in Shopify

New Member
1 0 14


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!

122 0 35

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
10274 144 1943

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 to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.

★ ★
Shopify Partner
1 0 2

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 35

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 3

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 2

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 13

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.