Search by

fostercommerce / advanced-discounts

fostercommerce

Build tiered, conditional, and buy-one-get-one discounts from cart rules.

Package info

github.com/FosterCommerce/craft-advanced-discounts

Documentation

Type:craft-plugin

pkg:composer/fostercommerce/advanced-discounts

Statistics

Installs: 603

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 2

1.4.0 2026-11-30 18:15 UTC

This package is auto-updated.

Last update: 2026-11-30 18:15:55 UTC


README

Advanced Discounts

Advanced Discounts

Build tiered, conditional, and buy-one-get-one discounts from cart rules.

Overview

  • Build tiers into one discount, each with its own cart rules and reward: 10% off at $100, 15% at $200, 20% at $500.
  • Show customers messages in your cart template, with live figures such as how much more to spend for the next tier.
  • Run "buy one, get one free" promotions, where buying one product discounts another.
  • Require a coupon code, with bulk code generation and a usage limit per code.
  • Limit a discount to matching products or variants.
  • Start a new discount from a preset: free items, free shipping, or a free order.
  • Choose whether Commerce calculates tax before or after discounts, and whether a shipping discount lowers the shipping cost or shows as its own discount line.

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 order adjustments 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 calls getMessages():

{% 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