Skip to content

Commerce Foundations: the B2B ecommerce platform for manufacturers and distributors. See what it includes

Craft CMS plugins

Advanced Discounts

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

Recipe: buy one, get one free

Goal: a free pair of Classic Socks with every Classic Tee.

  1. Go to Advanced Discounts -> Discounts and click New discount. Name it “Free socks with a tee”, and set Type to Buy X, Get Y.

  2. Leave Stop Processing Further Discounts off, so customers can still earn other discounts.

  3. Give the group a Discount Name.

  4. Under Customer buys, set the quantity to 1 and choose Classic Tee.

  5. Under Customer gets, set the quantity to 1 and choose Classic Socks.

  6. Choose Discount a percentage and enter 100, which makes the socks free.

  7. Leave Apply repeatedly on, so the reward is earned once per tee.

    Setting the trigger and discounted products

  8. Add any messages you want the customer to see when they qualify.

    Messages and conditions to show to the customer in the checkout

  9. Click Save discount.

With 4 tees and 4 pairs of socks in the cart, all 4 pairs are free. The plugin does not add the socks to the cart.

Where to go next#

  • Cart actions, how the reward quantity is worked out when the trigger and reward are the same product.
  • Messages, the tokens available to a Buy X, Get Y discount.

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 $3K partnership fee.

How the Dev Partnership Program works
Book a call with Stephen