All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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
Solved! Go to the solution
This is an accepted solution.
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:
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!
June | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
This is an accepted solution.
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:
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!
June | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
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.
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.
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.
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.