How to Prevent Double Discounts with Shopify Discount Codes
Can discount codes be blocked from applying to sale items?
Shopify does not offer a native way to prevent discount codes from being applied to products that are already on sale (products with a compare-at price). By default, Shopify will apply discount codes on top of the current product price, which can result in double discounts.
However, there is a reliable workaround using collections.
Recommended Solution: Exclude Sale Products Using a Collection
Step 1: Create a “Not on sale” automated collection
- Go to Shopify Admin → Products → Collections
-
Click Create collection
Select Automated as the collection type
Set the condition:
- Compare at price → is empty
- Save the collection and name it something like Not on sale
This collection will automatically include only products that are not discounted.
Step 2: Restrict discount codes to this collection
- Go to Shopify Admin → Discounts
- Open the discount code you want to restrict
- Under Applies to, choose Specific collections
- Select the Not on sale collection
- Save the discount
Now, the discount code will only apply to products that do not already have a sale price.
Important Notes About Shopify Discounts
- Shopify always stacks discounts on top of the current product price
- This workaround does not work for order discounts
- There is no way to block discount codes from sale items globally
- Automatic discounts and discount codes can be limited using collections
- Shipping discounts are not affected by product pricing
How this works with apps like Rockit
If an app applies discounts by modifying the product price (using compare-at prices), Shopify will still treat the product as eligible for discount codes unless you explicitly exclude it using the method above.