Skip to content
Examples

How to run a 3 for 2 with the cheapest item free on Shopify

Across a mixed collection, which of the three items is free decides whether the promotion costs you a little or a lot. Freeing the cheapest qualifying item is the default because it is the margin-safe choice and the one shoppers already expect.

  • Buy X get Y
Halo & Root$78.00
  • Scalp Renew Serum

    Qty 1

    $30.00
  • Deep Repair Hair Mask

    Qty 1

    $28.00
  • Volumize Daily Shampoo

    Qty 1

    $20.00
3 for 2 - cheapest item free-$20.00
Total at checkout-$20.00$78.00$58.00
Three items at three prices. The cheapest is the one freed.
What the shopper sees

Three items go in and the cheapest one drops to zero, with the saving shown on its own line. The behaviour matches what shoppers already assume a 3 for 2 means, so there is nothing to explain.

Build it

How to set this up

  1. 1

    Campaign > Offer type

    Pick Buy X get Y.

    type = bxgy

  2. 2

    Target

    Target the collection the promotion covers. Every item in it is both a qualifying item and a possible free item.

    target.scope = collections

  3. 3

    Buy and get

    Buy quantity 2, get quantity 1, at 100% off.

    bxgy.buyQty = 2

  4. 4

    Get selection

    Set the get selection to cheapest eligible so the free unit is drawn from the same pool rather than matching the trigger.

    bxgy.getSelection = cheapest_eligible

  5. 5

    Allocation

    Leave allocation at cheapest first. Switching to most expensive first makes the same promotion considerably more expensive on a mixed cart, so change it only on purpose.

    stacking.allocation = cheapest_first

  6. 6

    Set counting

    Leave free units as additional so a set is two paid plus one free, which is how a 3 for 2 is normally understood.

    bxgy.freeUnitsAreAdditional = true

  7. 7

    Preview

    Simulate a cart with a wide price spread and confirm which unit was freed, then publish.

The exact settings

Every setting, spelled out

These are the real configuration keys the offer is saved with, so you can check your own setup against this table field by field.

SettingValueConfig key
Offer typebxgytype
Buy quantity2bxgy.buyQty
Get quantity1bxgy.getQty
Get selectioncheapest_eligiblebxgy.getSelection
Get reward100% offbxgy.getDiscountPct
Allocationcheapest_first (default)stacking.allocation
Set countingfree units additionalbxgy.freeUnitsAreAdditional
Reward capoptional per orderbxgy.maxRewardsPerOrder
Watch it

See it built end to end

The episode is not up yet

We are recording this one. The written recipe above is complete, so you can build it today.

Without an app

What Shopify does natively

What you can do

Native Buy X Get Y frees the lowest-priced qualifying unit, so the basic behaviour matches without an app.

Where you need an app

Native Buy X Get Y gives no control over allocation if you want the opposite behaviour, no independent cap on discounted units per order, and no way to preview a mixed-price cart before publishing.

Before you publish

Watch out for

  • Allocation is a margin decision, not a display preference. Most expensive first on a wide price range can cost several times more per order.
  • Free units are additional by default, so six items yield two free rather than three.
  • Without a cap on rewards per order, a large order can free a lot of units at once.
  • If the collection spans a very wide price range, consider narrowing the target rather than accepting the spread.

Common questions

Which item is free in a 3 for 2?
The cheapest qualifying item, by default. That matches native Shopify behaviour and shopper expectations.
Can I make the most expensive item free instead?
Yes, by changing allocation. Model the cost first, because on a mixed cart the difference is large.
Why does a cart of six only free two items?
Because each set is two paid plus one free by default. Six units make two complete sets.
Can I cap how many free units one order can take?
Yes, with a per-order cap on rewards.

Related examples

BOGO across variants

Buy one get one where any variant in the range can be the free unit.

Repeating multibuy

Second item half price, repeating on every subsequent pair rather than once per cart.

Mix and match bundle

Any 3 items from a collection for one price, repeating for every complete set.

Build this in your own store

Every recipe in this library runs on the same server-side engine, so the cart total and the checkout total agree.

We use essential cookies to run this site, and, only with your permission, analytics cookies to understand traffic. Read our Cookie Policy.