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.

Installation

A Craft Commerce plugin for building multi-tier discounts with flexible rules and promotional messages.

Requirements#

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

Install#

From the Plugin Store, search for Advanced Discounts in Settings -> Plugins and press Install.

With Composer:

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

With DDEV:

ddev composer require fostercommerce/advanced-discounts -w && ddev craft plugin/install advanced-discounts

Once installed, the plugin adds an Advanced Discounts item to the control panel sidebar.

Configure#

Access the plugin settings by going to Settings -> Plugins -> Advanced Discounts.

Tax Basis controls when tax is calculated relative to the discount. Default: After discounts.

  • After discounts: the discount comes off first, and tax is calculated on the reduced figure. The customer pays less tax on a discounted order.
  • Before discounts: tax is calculated on the original prices, and the discount is applied afterwards. The cart keeps its original shipping cost and tax lines, with the discount shown against them.

Pick Before discounts when the cart or invoice has to show what an item and its tax would have cost, then the saving.

Overriding it per discount#

Each discount has its own Tax Basis field on its edit page, set to Use plugin default until you change it.

The setting resolves per order, not per discount. If any enabled discount resolves to Before discounts, the whole order uses it, including the tax on discounts from elsewhere. A discount counts as soon as it is enabled and passes its coupon requirement, because its conditions are never checked here. So one discount set to Before discounts changes the tax on orders it never applies to.

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