Storefront Fix Guide
Fix common Shopify storefront problems fast
Blog

Reviewed October 29, 2026

Fix: Automatic Discount and a Code Collide at Shopify Checkout

The customer has a code from your email. Your store is also running an automatic promotion. At checkout one of three things happens: the code is refused, the automatic discount disappears, or, occasionally, both apply and your margin takes a hit you never approved. None of those outcomes is a bug in the usual sense. They are the result of combination settings on each discount, which most stores set once, during a busy campaign setup, and never look at again. The fix is to audit what each discount is allowed to combine with, in Shopify discount settings, and make the rules say what the campaign meant.

Start by naming the exact symptom

Write down which of the three failures you have, with a real cart that reproduces it. Code rejected with a message usually means the automatic discount in the cart is not set to combine with product or order discount codes, or the code itself excludes combination. Automatic discount vanishing when a code is entered means the code is treated as the better or the exclusive offer and replaces it, which is combination logic working as configured, just not as intended. Both applying when they should not means at least one side allows combination and the campaign was priced assuming exclusivity. Each symptom points at a different setting, so do not change rules at random and retest by feel; reproduce first, change one rule, and run the same cart again.

Related reading

If this topic is useful, these earlier guides go deeper on connected questions: Shopify Checkout Errors After Removing an App: A Fix Guide, Why Product Images Turn Blurry After Upload, and How to Fix It, and Duplicate Title Tags in Shopify: Finding and Fixing Them.

Check combination settings on both discounts

In Shopify admin, open each discount and read its combinations section: whether it can combine with product discounts, order discounts, and shipping discounts, noting that those are separate toggles and a discount has a class. An automatic product discount set to not combine will block a product code; an order level code that allows product combinations will stack on top of an automatic product offer, if the automatic side allows it too. Combination has to be permitted by both discounts for stacking to occur. While you are there, check the other quiet causes: minimum purchase requirements the cart no longer meets after a discount changes the subtotal, active dates that ended mid campaign in a different timezone than you assumed, and usage limits reached earlier than expected.

Reproduce in a clean test before you announce anything

Use a fresh browser session or a test customer with no stored discounts, build the exact cart from the customer report, and apply the code in the same order the customer did. Automatic discounts depend on cart contents, so adding the code before the qualifying product is in the cart can look like a failure that is really a sequence issue worth documenting in your campaign copy. Check the result on mobile checkout as well as desktop, because that is where most customers meet the problem. Screenshot the working total and the settings that produced it. When support answers the next ticket on this campaign, and there will be a next one, that record turns a half hour investigation into a two minute reply.

Set a house rule so the next campaign does not repeat it

Most stores need a default: automatic site wide offers do not combine with codes unless a campaign is explicitly priced for stacking, and that exception gets written on the campaign brief. Put the combination settings in the campaign launch checklist next to dates and minimums, and require a test checkout with a real code before the announcement email sends. Discount conflicts feel like checkout bugs to customers and erode trust at the payment step, the worst place in the funnel to lose it. The settings take ten minutes to audit per campaign. The argument with a customer who has screenshots of a lower total takes considerably longer.

Frequently asked questions

Why does Shopify say my discount code is not valid with the items in the cart?

That message usually means combination rules block it, or the cart does not meet the code conditions. Check whether an automatic discount is already applied and whether both discounts allow combining with each other class, then check minimum spend, eligible products or collections, customer eligibility, and active dates. Test with a cart that plainly qualifies. If a plainly qualifying cart in a clean session still fails, the setting conflict is real; if it works, the original cart had a condition issue worth naming in your reply to the customer.

Can I let a code stack with an automatic discount on purpose?

Yes, if both discounts have combination enabled for each other class and the campaign economics were priced for it. Set it deliberately, test the exact stack in checkout, and calculate the combined effective discount on a typical basket before launch, including what happens with a shipping offer in the mix. Stacking surprises usually come from each discount being set by a different person at a different time. A single campaign owner checking the final combined total prevents the margin version of this bug.

Why did the automatic discount disappear when a code was entered?

Because Shopify applies the combination rules as configured: if the entered code does not combine with the automatic discount, checkout keeps the applicable single discount result rather than running a promotion your settings declared exclusive. It feels like the code broke the sale, but the settings did exactly what they said. To keep the automatic offer and accept codes on top, both discounts need combination allowed. To keep the better of the two for the customer, say so in the campaign copy so the behavior reads as policy, not malfunction.

Do discount apps change how combination works?

They can. Some apps implement offers through draft orders, functions, or their own code systems, and those paths interact with native Shopify discounts in app specific ways. If a conflict involves an app offer, test with the app offer alone and the native code alone before testing them together, and read the app current documentation for combination behavior. When a campaign matters, run the full test matrix: no code, code only, automatic only, both, on the exact products in the campaign.