DCB Discount Code Blocker logoDCB
How-to

How to Stop Discount Codes on Sale Items (Compare-at Price) in Shopify

By Viktoriia Pavlova · · 7 min read

Quick answer

Shopify discount codes apply to sale items by default. DCB detects products with a compare-at price (your sale items) and blocks discount codes for them automatically — no collections or tags to maintain.

The problem: double discounts on marked-down products

In Shopify, a product is “on sale” when its compare-at price is higher than its price. But Shopify's discount codes don't know that. A customer can take a 40%-off clearance item and add a 20% newsletter code on top.

The native workaround (and why it breaks)

The usual workaround is to build a collection of full-price products and restrict every code to that collection. It works — until you forget to update it.

  • Every new code must be limited to the right collection
  • Codes created by apps often apply to “all products” by default
  • When a sale ends, products have to move back

The automatic way: block by compare-at price

DCB watches the cart, not your collections. Any product with a compare-at price is treated as a sale item, and discount codes are blocked for it.

  1. Open DCB and select Block discount for Sale Items.
  2. Decide if you want to block discount codes only, or also automatic discounts.
  3. Add allowed codes (optional) and a custom message.

That's it. Put a product on sale and it's protected. Remove the compare-at price and codes work again.

Want this done in two clicks? Install DCB – Discount Code Blocker and start your 3-day free trial.

Tips for sale-item protection

  • Tell shoppers upfront: add “Discount codes not valid on sale items” to your product pages
  • Translate the error message — DCB supports English, German, Spanish, Portuguese (Brazil) and French
  • Combine with scheduling for seasonal clearances

Frequently asked questions

How do I exclude sale items from discount codes in Shopify?
Natively, you must restrict each code to a collection of non-sale products. With DCB, choose “Block discount for Sale Items” and every product with a compare-at price is excluded automatically.
What counts as a sale item?
Any product variant whose compare-at price is set higher than its current price.

Block discount codes the easy way

Sale items, tags, selected products or everything — scheduled. 3-day free trial.

Install DCB