Discount Functions: When Two Discounts Stack and When They Cancel

Every discount in Shopify, automatic or code, belongs to one of three classes: product, order, or shipping. A product discount takes money off specific items or collections. An order discount takes money off the cart subtotal. A shipping discount changes the shipping cost. The class is what the discount changes, and it decides what the discount can sit next to.

The limits are specific. A customer can use a maximum of 5 product or order discount codes and 1 shipping discount code on the same order, and a store can have a maximum of 25 active automatic discounts. Discounts can only be combined on orders through the online store, the Storefront API, and Shopify POS. Those are the rails, and everything else follows from them.

Three classes decide everything

Two discounts combine only when each one is set to combine with the other's class. The setting lives in the Combinations section of each discount, and both sides have to agree. A 20 percent product discount that allows order discounts still will not stack with a 10 percent order code unless the code allows product discounts too. When the settings do not match, Shopify applies the best discount or combination for the shopper's cart, and the shopper sees the message that the discount could not be used with the existing discounts.

Three pairs combine on every store: product discounts on different items, product discounts with free shipping, and order discounts with free shipping. Two more pairs need an eligible store: product with order, and order with order. Product discounts on the same item need Shopify Plus. Shipping with shipping never combines. That table is the whole rule, and it is worth printing.

Combinations are opt-in on both sides

One product discount applies per line item, on every plan except Plus. Two product discounts can sit in the same cart when they are on different items, but on the same item they compete, and Shopify keeps the larger saving on that line. A volume tier on three units and a 10 percent product code on the same product will never both apply, and the shopper will see the better one win without knowing why.

The fix is to change the class, not the discount. Convert the product code to an order code where you want it to stack with a bundle, because an order discount applies to the subtotal after the product discount has done its work. Shipping discounts apply last, after products and the order subtotal, which is why a free-shipping threshold and a product discount rarely fight.

The same-line trap

Build the cart, enter both codes, and read the result. The message tells you which rule fired: a code that cannot combine, a code that is not valid for the items, or both codes applied and the total you expected. Test the pairs your shoppers actually use, not the pairs in the documentation, because the combination settings on your live discounts are the ones that decide.

Keep reading: Checkout UI Extensions: Three Per Target, 64 KB, No Exceptions, Custom-App Functions Need Plus. Public-App Functions Do Not.

Test it with a real cart

Check the automatic discounts too, because they combine under the same rules and they are the ones most often forgotten. An automatic 10 percent off that does not allow combining will silently eat a code the shopper typed in, and the shopper will blame the code. The settings page is the fix, and it takes two minutes.

Frequently asked questions

How many discount codes can a customer use on one Shopify order?

Up to 5 product or order discount codes and 1 shipping discount code. A store can have a maximum of 25 active automatic discounts.

Why did my discount code say it cannot be combined?

One of the two discounts was not set to combine with the other's class. Shopify keeps the better saving for the shopper and shows the message.

Can two product discounts apply to the same item?

Only on Shopify Plus. On other plans, one product discount applies per line item, and Shopify keeps the larger saving.

Do shipping discounts combine with product discounts?

Yes, when both allow it. Shipping discounts apply last, after the product discount and the order subtotal.