How to stop discount codes stacking on sale items in Shopify

Updated

Short answer: a lowered price with a compare at price isn’t a “discount” to Shopify, so discount codes apply to it like to any other price. To stop codes stacking on sale items you either limit your codes to the products that aren’t on sale, or use an app that refuses codes on carts with sale items while the sale runs.

Why codes stack on sale items

When you put a product on sale by lowering its price (and showing the old one as the compare at price), Shopify sees a normal price. Discount combinations settings only decide which discounts can be used together; they don’t know the product is on sale. So a 10% code takes another 10% off your sale price.

Option 1: limit codes to collections without sale items

Shopify’s discount codes apply to all products, or to the collections or products you choose. At the time of writing there’s no built-in “everything except sale items” setting, so you build a collection of the products that can take a code:

  1. Create an automated collection, for example “Full price”, with the condition Compare at price is empty.
  2. In each discount code, under Applies to, choose Specific collections and pick “Full price”.

Check the collection after you save it: Shopify includes a product when any of its variants matches, so a product with one variant on sale and one not may still be in it.

Option 2: tag sale products

Tag the products in your sale (for example sale), and build the “Full price” collection from products without that tag, or keep a collection of tagged products and leave it out of your codes. You have to add and remove the tag yourself, or use an app that tags sale products when the sale starts and removes the tag when it ends.

Option 3: block codes on sale items while the sale runs

With [App], switch on Block discount codes under While it runs when you create the sale. While it runs, a discount code is refused at checkout if the cart has a product from the sale; free shipping codes still work. When the sale ends, codes work again by themselves. See Stopping discount codes on sale items.

Note that this refuses the code for the whole cart, not just the sale item, and it’s on the Basic plan and up.