Search by

fostercommerce / advanced-discounts

fostercommerce

Advanced Discounts for Craft Commerce

Package info

github.com/FosterCommerce/craft-advanced-discounts

Documentation

Type:craft-plugin

pkg:composer/fostercommerce/advanced-discounts

Statistics

Installs: 491

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 2

1.2.0 2026-10-30 19:51 UTC

This package is auto-updated.

Last update: 2026-11-02 20:38:02 UTC


README

Advanced Discounts

Advanced Discounts

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

Overview

  • Applies a discount when the customer's cart matches rules you set on date, line items, order totals, or the customer on the order.
  • Stacks multiple tiers inside one discount, each with its own rules and reward (10% off at $100, 15% at $200, 20% at $500).
  • Discounts an item subtotal, specific line items, or shipping, by a flat amount or a percentage.
  • Runs "Buy One Get One Free" style promotions where one product in the cart discounts another.
  • Shows the customer promotional messages that fill in live figures, such as how much more they need to spend to reach the next tier.
  • Gates a discount behind a coupon code, with bulk code generation and a per-code usage limit.
  • Controls whether tax is calculated before or after discounts, for the whole store or per discount.

How it works

Create discounts under Advanced Discounts -> Discounts. Each time Commerce recalculates a cart, the plugin tests each enabled discount from the top of the list down, and adds an order adjustment for each one that matches. Prices stay as they are. Commerce's own discounts still apply, and both can discount the same cart.

Usage

Promotional messages appear where a template asks for them:

{% for discountMessage in craft.advancedDiscounts.getMessages(cart) %}
  <p>{{ discountMessage }}</p>
{% endfor %}

This prints each message whose rules match the cart, with figures such as {amountRemaining} filled in.

Requirements

  • Craft CMS ^5.0
  • Craft Commerce ^5.0
  • PHP ^8.2

Install

composer require fostercommerce/advanced-discounts
./craft plugin/install advanced-discounts

Documentation

License

Proprietary.

Foster Commerce