Shopstack Work with us

Guides Fix a problem

Limit and block discount codes on Shopify

What Shopify does on its own

Shopify's discount settings decide who can use a code and which discounts may stack. They don't let you reject a code by your own rule. Each item below links the Shopify page it comes from (checked 2026-10-23).

Shopify can

  • Accept up to 5 product or order discount codes and 1 shipping discount code on the same order. Source: help.shopify.com
  • Stack discounts only when the Combinations setting on each discount allows it. Every store can combine product + shipping, order + shipping, and product + product on separate items. Source: help.shopify.com
  • Limit who can use a code: all customers, specific customers, customer segments, or markets. Add a minimum purchase amount or quantity, a total usage limit, or one use per customer. Source: help.shopify.com
  • Apply a product discount only to specific products or specific collections. This is a product discount setting, not an order discount one. Source: help.shopify.com
  • Run a public app's discount Function on any Shopify plan. Source: shopify.dev
  • A discount Function backed by an automatic discount can reject codes the customer typed and show them a message. Source: shopify.dev

Shopify can’t

  • Lower the 5-code limit. The admin has no setting for it. Source: help.shopify.com
  • Combine product + order or order + order discounts on every store. Those combinations are only for eligible stores, and stacking several product discounts on the same line item is Shopify Plus only. Source: help.shopify.com
  • Exclude products or sale (compare-at) items from a code, or cap the amount a code takes off. Neither is in Shopify's discount settings (help center, 2026-10); the only floor is that the order value can't go below $0. Source: help.shopify.com
  • Reject a typed code by a rule of your own without a discount Function. Source: shopify.dev
  • Only stores on Shopify Plus can use custom apps that contain Functions; other stores use a public app. Source: shopify.dev
  • Use Shopify Scripts. Editing stopped on 2026-04-15 and all Scripts stopped running on 2026-06-30. Source: shopify.dev

Keep codes off sale items

Merchants often ask how to stop a product discount code from stacking on a product that is already marked down. You can build a workaround from Shopify's documented collection conditions:

  1. Create an automated collection with the condition Compare at price is not set (Shopify help). With the standard Products source, it holds every product where at least one variant has no compare-at price. A compare-at price of $0.00 is not empty.
  2. In the product discount, set Applies to to Specific collections and pick that collection.
  3. Save. The code now skips products whose variants all have a compare-at price. In a Products-source collection, a product that mixes marked-down and full-price variants is still in the collection, so the code also discounts its marked-down variants.

In a Products-source collection, the workaround works cleanly when a sale marks down every variant of a product. Shopify also documents a Variants source that holds only specific variants; Shopify's help doesn't say whether a discount applied to that collection honors it, so test it before you rely on it. The workaround fails for order discounts, because an order discount applies to the whole order, not to a collection. To block codes whenever the cart holds a compare-at item, look at apps built for it. DCB ‑ Discount Code Blocker says it “stops customers from applying discount codes to sale items (with a compare-at price)”. SDB ‑ On Sale Discount Blocker says it “automatically blocks coupon codes or automatic discounts when items are already discounted”.

Discount Genie's rejection rules don't check for sale or compare-at items. A rejection rule also drops the whole code; it can't make a code skip only some lines.

Set code rules with Discount Genie

Discount Genie rejection rules decide which typed codes Shopify keeps. Each rule runs as a Shopify discount Function in a public app, so it works on any plan, not only Plus. Rejection rules are included on every plan, including Free.

  • Block every code. Reject all codes during a sale, for example on Black Friday, so shoppers use only the offer you promote.
  • Cap codes per order. Keep the first codes up to your limit, for example 2, and reject the rest.
  • Match codes by title. Match code text with equals, starts with, ends with, contains, or their opposites, joined with AND or OR. Example: codes that start with INF, keep 1, so a shopper can use only one influencer code per order.
  • Add cart conditions. Apply the rule only in certain Shopify markets, or only when the cart has a code that matches your text rule.
  • Add customer conditions (paid plans). Apply the rule by customer tag, email, or email domain. Customer conditions can require a logged-in shopper: tick Require users to be logged-in, and that rule never rejects guest checkouts. Conditions on products or collections in the cart are also on paid plans.
  • Write the shopper message. You write the message shoppers see when a code is rejected. It can name the rejected codes and be translated per language. Shopify shows it as a warning banner at checkout.

Two limits to plan around: rejection rules act only on codes Shopify marks as rejectable, and they don't cap how much a code takes off. Discount Genie's own discounts have a maximum discount cap, on paid plans.

FAQ

Can I limit how many discount codes a customer uses per order without Shopify Plus?

Not with Shopify's settings: the limit is fixed at 5 product or order codes plus 1 shipping code. A public app's discount Function, backed by an automatic discount, can reject the extra codes on any plan. Discount Genie's rejection rules do this on the Free plan.

How do I stop discount codes stacking on items that are already on sale?

One workaround, built from Shopify's documented collection conditions, is to point a product discount code at an automated collection with the condition Compare at price is not set. With the standard Products source, the collection still includes a product if any one variant has no compare-at price, so the code can hit its marked-down variants. Shopify also documents a Variants source for collections; its help doesn't say whether discounts honor it. Order discounts can't use that workaround. Apps such as DCB ‑ Discount Code Blocker list blocking codes on sale items with a compare-at price; Discount Genie's rejection rules don't check for that.

Can I exclude specific products from a discount code?

Shopify's discount settings have no exclude option (help center, 2026-10). Instead, set the code to apply to specific products or collections that leave those products out.

Can I cap a percentage code, for example 10% off up to $50?

A maximum discount amount is not in Shopify's discount settings (help center, 2026-10). Rejection rules don't cap a code's value either. Discount Genie's own discounts have a maximum discount cap on paid plans.