Skip to content

Commerce Foundations is our pre-built Craft Commerce store. See what it includes

Craft CMS plugins

Advanced Discounts

A Craft CMS plugin that builds multi-tier Craft Commerce discounts from flexible cart rules.

Coupon Codes

Require Coupon Code decides how a discount is triggered. Off, it applies to every order matching its rules, like a sale. On, the customer has to enter one of its codes at checkout.

Coupon code creation

Adding codes#

Add codes by hand, or click Generate for a batch.

Generating coupon codes

Enter how many you want and a format. Each # becomes a random character, so SPRING_#### produces codes like SPRING_A7K2. The default format is DISCOUNT_####.

List of generated coupon codes

Codes are unique across every discount, not just this one. Generated codes avoid codes already in use, and saving a duplicate by hand fails validation. Matching at checkout ignores case, so BIG10 and big10 are the same code.

Uses and limits#

Uses counts completed orders. It increments when the order completes, so a code sitting in an abandoned cart never counts against its limit.

Leave Max Uses blank for unlimited. Once a code reaches its limit it stops working.

What the customer sees#

A code that has hit its limit, or that belongs to a disabled discount, is removed from the cart along with a notice: “This coupon has reached its usage limit.” or “This coupon is no longer available.” Render order.notices in your templates, or the code will vanish with no explanation.

An order holds one coupon code at a time. Entering a second replaces the first.

Advanced Discounts codes and Commerce’s own coupon codes are separate sets. A code this plugin does not recognize is left entirely to Commerce, including Commerce’s own “Coupon not valid” handling. Avoid using the same code in both systems: each one would apply its discount to the order.

Deleting a discount deletes its codes.

We can take it from here.

We take on the Craft and Craft Commerce sites you built, so you can get back to building. Introduce a client who signs a management contract and you get a $3,000 partnership fee.

How the Dev Partnership Program works
See if we’re a fit