Buy X Get Y
The classic "buy some, get some free or discounted" deal. Choose how many to buy, how many to reward, which items qualify as the reward, and how a complete set is counted.
Buy X Get Y rewards specific items: buy a quantity of eligible products and get another quantity free or at a discount. It is a product discount. The two settings that most change the result are the set basis and repeat, so it is worth reading both sections below before you publish.
What you set
| Field | Choices | Default |
|---|---|---|
| Buy quantity (X) | Whole number, 1 or more | 1 |
| Get quantity (Y) | Whole number, 1 or more | 1 |
| Get selection | Same item / Cheapest eligible / Specific items | Same item |
| Get items | Variant picks (only with "Specific items") | Empty |
| Get discount % | 0 to 100 (100 = free) | 100 |
| Set basis | Add a free item on top (recommended) / Discount within the group | Add a free item on top |
| Repeat | Once / Repeat | Once |
| Counting | Per variant / Per product / Across matching products / Whole cart | Across matching products |
Specific items needs a filled pool
If you choose "Specific items" as the get selection, you must add at least one variant to the get pool before you can publish. An empty pool is blocked.
Set basis: the setting that changes the math most
Set basis decides how a complete deal is counted when the same items are both bought and given away.
- Add a free item on top (recommended): a "buy 3 get 1 free" set is 4 items, 3 you pay for plus 1 free, and the free one does not count toward earning the next free one. This matches Shopify’s native Buy X Get Y and protects your margin. With this basis, "buy 1 get 1" frees half the cart.
- Discount within the group: every Nth item is free out of the qualifying items. With this basis, "buy 1 get 1" would make the entire cart free.
The builder shows a live example that recalculates as you switch set basis. Always read it before saving. Set basis is the number-one source of "the math looks wrong" surprises.
Once versus repeat
Once applies the deal a single time. Repeat re-applies it for every full set in the cart. Take "buy 3 get 1 free" with 9 identical items in the cart:
| Set basis | Once (free items) | Repeat (free items) |
|---|---|---|
| Add a free item on top (recommended) | 1 | 2 |
| Discount within the group | 1 | 3 |
With "Add a free item on top", a set is the 3 bought plus 1 free (4 items), so 9 items make 2 complete sets. With "Discount within the group", every 3rd item is free, so 9 items make 3 free.
The exact per-line output for these Buy X Get Y examples will be generated from the tested golden fixtures.
Which unit is discounted
When more items qualify than the deal rewards, the allocation setting decides which physical units become free or discounted. Cheapest first (the default) discounts the lowest-priced qualifying unit, which protects your margin and matches Shopify’s own Buy X Get Y. Most expensive first favours the shopper. If two candidate items have the exact same price, the tie is broken in a fixed, repeatable order, so the outcome is always consistent.
The get discount is always worked out from the item’s original price, never from a price another discount already reduced. A get discount of 50 percent takes half off the item’s full price.
Common setups
Buy 2 get 1 free, repeating
- Buy / Get
- Buy 2, get 1
- Get selection
- Same item, 100% off
- Repeat
- On (mind the set basis)