Hi everyone,
I’m looking for a way to limit the total number of discount codes a customer can use per checkout to 3.
Our current setup:
-
Shopify Advanced plan (not Plus)
-
~9,000 unique discount codes in our system
-
Multiple discount types that can currently stack:
-
10% storewide discount
-
Bulk/quantity discounts (20-30%)
-
Fixed amount codes ($5 off)
-
Special discounts (e.g., 10% military)
What we need: A way to cap the number of discounts applied at checkout to a maximum of 3, regardless of type.
Constraints:
-
Migrating 9,000+ codes to a new app isn’t ideal
-
We don’t have Shopify Plus
-
Some checkout applications form the App Store only lets us limit discount percentages, not the count of codes used
My questions:
-
Is there an app that can enforce a maximum number of combined discounts without requiring us to recreate all our codes?
-
Has anyone found a workaround for this?
Any advice or recommendations would be hugely appreciated!
Thanks in advance.
Fix the information architecture first, campaigns should be given a shorter leash to avoid negative combinations just like dogs in a park.
“You can have a maximum of 25 active automatic discounts” shopify help doc
Longshot is to just ask support DIRECTLY if that number can be voluntarily lowered but even IF they entertain that it’s not like it’s gonna be a switch you can toggle off on when you want.
But you should make this a feature request to an actual support-advisor.
If there’s a limit then that implies a priority system for automatic discounts and that’s a whole other problem by itself.
See if a discount app with logic features like Regios Automatic discounts can handle this; @tobebuilds
.
Otherwise you probably need to build custom and retool the discounts.
If there’s serious budget behind trying to explore this you can reach out to me for services.
With shopify-functions the issue might be the cartInput doesn’t come with a list of already applied discounts the function has to parse the cart lines etc and figure it out which might ruin the performance limits required by shopify.
And to work smoothly I think it might need the additional networking permissions for coordinating system-state(counting, set attributes/metafields??).
Which means Plus/enterprise plans https://shopify.dev/docs/apps/build/functions/network-access#availability-of-network-access-for-functions
About the only way to do this just through the admin is with like customer segments as a filter??, READ: everyone is logged in.
Or some scheme where a specific item/attribute in the cart makes discounts invalid, e.g. duplicate products, but also somehow not arbitrary so some discounts will apply but also somehow with a maximum.
Maybe possible through the draft-order system but then your no longer dealing with pure auto applied automatic discounts.
e.g. https://help.shopify.com/en/manual/fulfillment/managing-orders/create-orders/discounts#apply-all-eligible-automatic-discounts & tools like mechanic https://tasks.mechanic.dev/create-a-draft-order-from-the-cart
With over 9,000.. discounts in the mix with any number of them allowed to be combinable your gonna have a bad time from the poor information architecture.
Hi Paul, thanks for mentioning Regios! Unfortunately, our app can’t do this.
The ideal solution would be for merchants to use the Discounts Allocator Functions API, which allows stores to override Shopify’s discount combination rules with their own logic. However, it’s been in developer preview for years and will probably never be released (in my honest opinion).
Best,
Tobe
Hey everyone,
Thanks to everyone who contributed to this thread - your insights were really valuable in understanding the limitations and options.
TL;DR: I upgraded to Shopify Plus and built a custom Checkout UI Extension that successfully limits discount codes to 3 per checkout.
Why Plus was necessary:
As @PaulNewton mentioned, the checkout blocking capability requires Plus. Specifically, you need access to:
-
Checkout UI Extensions with block_progress capability
-
useBuyerJourneyIntercept() hook for preventing checkout completion
-
Network access for Functions (if you go that route)
What I built:
A Checkout UI Extension that:
-
Detects all discount types - Manual codes, automatic product discounts, and order-level/storewide discounts
-
Counts them intelligently - Excludes shipping discounts, prevents duplicate counting
-
Blocks checkout when >3 discounts are applied
-
Shows clear messaging - Success banner (0-3 discounts) or error banner with full list (4+).
How it works:
The extension uses React hooks:
-
useDiscountCodes() - Manual codes entered by customers
-
useCartLines() - Automatic product discounts
-
useDiscountAllocations() - Order-level discounts
-
useBuyerJourneyIntercept() - Blocks checkout when needed
The counting logic uses a Set to avoid duplicates and excludes shipping discounts from the limit.
For anyone considering this:
If you’re on Advanced plan with similar needs, here’s what I learned:
-
Apps won’t solve this - I evaluated multiple discount apps; none can enforce a hard limit on discount count without Plus
-
Plus is required for blocking - You can build logic on Advanced, but only Plus can actually prevent checkout
I’ve documented the full technical implementation including architecture, code examples, and common pitfalls. Happy to share details if anyone needs them.
Bottom line: If you need to enforce (not just warn about) discount limits, Plus + custom extension is currently the only reliable path.
Hope this helps anyone facing similar challenges!
Hi, my app Discount Guardian can do this, you can limit the amount of discount codes that are added to a cart and set a custom message so that you can explain to customers why they can’t use it and don’t lose sales, best of all, it works on any plan, so you don’t need to upgrade to Plus to get this critical funcitonality