DCB Discount Code Blocker logoDCB
How-to

How to Stop Existing & Affiliate Discount Codes Working on Sale Items in Shopify

By Viktoriia Pavlova · · 6 min read

Quick answer

Shopify only lets you exclude products code by code. If you already have many influencer, affiliate or loyalty codes, DCB applies one rule to all of them: block codes on anything with a compare-at price, a tag, or a product you pick.

The problem merchants keep asking about

A common Shopify Community question: “I put items on sale, but customers still use old discount codes on them. How do I stop that without editing every code?” Codes from affiliates, influencers, loyalty apps and welcome popups were created at different times, often by different apps, and each one has its own product rules.

Why the native fix doesn't scale

In Shopify admin you can limit a code to specific collections. That means:

  • Opening every single code and changing Applies to
  • Building a “not on sale” collection and keeping it up to date
  • Missing codes created by apps like Smile.io, UpPromote, Refersion or Klaviyo
  • Undoing it all when the sale ends

One rule for every code with DCB

  1. Install DCB.
  2. Choose Block discount codes for products with compare-at price — every item on sale is protected automatically. See the compare-at price guide.
  3. Prefer control by tag? Tag sale items (e.g. `no-discount`) and use blocking by product tag.
  4. Keep VIP or staff codes working with Allow selected discount codes.
  5. Add a clear checkout message such as “Codes can't be used on sale items.”

Your codes are never edited or deleted, so affiliates and influencers keep their links.

Tell your affiliates

Send partners a short note before the sale: their code still works on full-price items. This avoids support tickets and keeps relationships healthy.

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

Related guides

Frequently asked questions

Can I stop old discount codes from working on sale items in Shopify?
Natively you must edit each code's product eligibility. DCB applies one rule to all existing codes, based on compare-at price, product tag or selected products.
Will affiliate links break?
No. DCB doesn't change the codes; they keep working on items that aren't restricted.

Block discount codes the easy way

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

Install DCB