Discounts

A discount is a set of rules, each pairing conditions with actions. Once that structure is clear, a simple code and a tiered promotion are the same job.

The structure

  • A discount is the promotion as a whole: its name, the dates it runs from and to, a maximum number of uses, its site and its position.
  • It has one or more rules, each an independent "if this, then that", with their own position and an Active switch.
  • A rule's conditions decide whether it applies: the cart, the order, particular products or product categories, the customer's country, a date window, particular people or person groups, a usage limit, or a template condition a developer writes.
  • A rule's actions decide what comes off: the cart total, particular products, or the shipping cost, which is how free delivery is set up. Each action has a value and a modifier.

Build discounts in the admin's Discounts section, from the top down: the discount, then a rule, then its conditions and actions.

Automatic or with a code

A discount without codes applies whenever its rules match. A discount with codes applies once the shopper enters one. Codes are managed in the Discounts section; a discount can have many, and each code has its own maximum number of uses, so a promotion can be one code used 500 times or 500 single-use codes. A code with a maximum of 0 cannot be used at all. Shoppers can type codes in any case.

A code can also have a link: following it applies the code and lands the shopper on a chosen page, optionally with chosen products in the cart.

Stopping discounts from stacking

Discounts are worked out in position order. A discount or a rule marked final stops any discount after it from applying. Without it, two discounts that both match both take effect.

Members-only discounts

A person group condition checks the groups of the signed-in customer. A guest has no groups, so the shopper must sign in before a members-only discount can apply.

Why a code "did nothing"

A code that exists and has uses left is accepted even when the order does not meet the discount's dates or conditions; it then takes nothing off. Check, in order: the discount's dates, the rule's conditions (a category that does not include the product, a value range the cart is outside), the uses left on the code and on the discount, and an earlier discount marked final.

Before you launch

Test with a real basket: add qualifying items, enter the code, and check the reduction is the amount you expect. Then try a basket that should not qualify. A promotion that applies to everything costs more than one that applies to nothing.

Developers: Discounts at checkout in the commerce guide.

Was this page helpful?

Your answer goes to the docs team.