PHPackages                             fostercommerce/advanced-discounts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. fostercommerce/advanced-discounts

ActiveCraft-plugin

fostercommerce/advanced-discounts
=================================

Advanced Discounts for Craft Commerce

0240↓50%PHPCI failing

Since Jun 30Pushed 1w ago1 watchersCompare

[ Source](https://github.com/FosterCommerce/craft-advanced-discounts)[ Packagist](https://packagist.org/packages/fostercommerce/advanced-discounts)[ RSS](/packages/fostercommerce-advanced-discounts/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)DependenciesVersions (20)Used By (0)

[![Advanced Discounts](resources/img/header.png)](resources/img/header.png)

Advanced Discounts
==================

[](#advanced-discounts)

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

It runs alongside Commerce's own discounts rather than replacing them. Both systems evaluate every order, and both can apply to the same cart.

Overview
--------

[](#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.

Requirements
------------

[](#requirements)

- Craft CMS `^5.0`
- Craft Commerce `^5.0`
- PHP `^8.2`

Install
-------

[](#install)

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

See [`docs/installation.md`](./docs/installation.md) for the full installation and configuration guide.

Discounts
---------

[](#discounts)

Discounts are created and ordered in **Advanced Discounts -&gt; Discounts**. Order matters: discounts are processed top down, and any discount can stop processing once it matches. Each discount holds one optional set of Global Conditions, plus any number of discount groups, each pairing its own cart rules with the actions and messages they trigger.

See [`docs/user-guide/discounts.md`](./docs/user-guide/discounts.md).

Conditions and actions
----------------------

[](#conditions-and-actions)

Conditions match on date range, line items (a specific purchasable, a quantity of it, or a relation to an entry), order totals, and the order's customer. When a group's conditions match, its actions adjust the item subtotal, chosen line items, or shipping, by a flat amount or a percentage.

See [`docs/user-guide/cart-conditions.md`](./docs/user-guide/cart-conditions.md) and [`docs/user-guide/cart-actions.md`](./docs/user-guide/cart-actions.md).

Promotional messages
--------------------

[](#promotional-messages)

Each group can carry messages with their own display conditions, so you can tell a customer both that they have earned a discount and how far they are from the next one. Messages support tokens (`{discountAmount}`, `{amountRemaining}`, `{quantityRemaining}`) that resolve against the live cart. The plugin outputs nothing on its own, so a developer renders them from Twig.

See [`docs/user-guide/messages.md`](./docs/user-guide/messages.md) and [`docs/dev-guide/displaying-messages.md`](./docs/dev-guide/displaying-messages.md).

Extending
---------

[](#extending)

You can add a discount type of your own, with its own action rules, by implementing `DiscountTypeInterface` and registering it on `DiscountTypes::EVENT_REGISTER_DISCOUNT_TYPES`.

See [`docs/dev-guide/custom-discount-types.md`](./docs/dev-guide/custom-discount-types.md).

Permissions
-----------

[](#permissions)

The plugin registers no permissions of its own. Every control panel screen and action is gated on Commerce's `commerce-managePromotions` permission.

See [`docs/reference/permissions.md`](./docs/reference/permissions.md).

Documentation
-------------

[](#documentation)

[Read the full documentation](./docs/index.md), including worked [recipes](./docs/recipes/site-wide-coupon.md) for coupons, timed sales, BOGOF, and tiered discounts.

License
-------

[](#license)

Proprietary.

Credits
-------

[](#credits)

Brought to you by [Foster Commerce](https://fostercommerce.com).

###  Health Score

29

—

LowBetter than 56% of packages

Maintenance64

Regular maintenance activity

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 64.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ac5b96165dd51aed8f0b9ea079d5d5beeb430a915cd07d645db0a228b0ac3aa?d=identicon)[fostercommerce](/maintainers/fostercommerce)

---

Top Contributors

[![peteeveleigh](https://avatars.githubusercontent.com/u/827065?v=4)](https://github.com/peteeveleigh "peteeveleigh (123 commits)")[![sjcallender](https://avatars.githubusercontent.com/u/984311?v=4)](https://github.com/sjcallender "sjcallender (57 commits)")[![johnnynotsolucky](https://avatars.githubusercontent.com/u/4161106?v=4)](https://github.com/johnnynotsolucky "johnnynotsolucky (11 commits)")

### Embed Badge

![Health badge](/badges/fostercommerce-advanced-discounts/health.svg)

```
[![Health](https://phpackages.com/badges/fostercommerce-advanced-discounts/health.svg)](https://phpackages.com/packages/fostercommerce-advanced-discounts)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
