# How to set up a Buy X, get Y offer on Shopify (buy 3, get the 4th free)

> Buy 3 and get the 4th free, at a set price or at a discount, from a collection or a list of products. The bar counts the items and Yaco Progress Bar discounts the item you choose.

Updated 2026-10-12 · https://www.yaco.studio/docs/buy-x-get-y

## Create the offer

A **Buy X, get Y** tier rewards a batch of items: "buy 3, get the 4th free", "the 4th at $5", "the 4th at 50% off".

1. Open **Goals & Discounts**, tab **Goals**, click **Add a goal** and choose **Buy X, get Y**.
2. Fill in the offer sentence: **Buy** *3 items* **from** *all products* **and get** *1 item free*, **applied to** *the last item added*, *on every batch*. Click a part to change it, and click it again to close it.
3. Click **Save**: the app creates the Shopify automatic discount.

The bar threshold is X + Y items: you never type it. The tier needs a bar of its own that counts items. If the tier was alone on its bar, that bar switches to counting items. If other tiers share it, the app creates an item bar for this tier with the same products, and the other tiers stay where they are.

## Choose the items

**from** sets which items count: all products, a collection, a list of products, or everything except some. These are the products of the tier's bar (see [bars](https://www.yaco.studio/docs/bars)). The items bought and the items received come from the same selection: "buy 3 pyjamas, get a pair of socks" is not possible yet.

## Choose the reward

- **Free**: the item is free.
- **At a set price**: the item costs the price you enter, converted to the customer's currency in other markets. An item that already costs less is not discounted.
- **With a discount**: a percentage off the item, between 1 and 100.

## Choose the discounted item

- **Last item added** (default): in each batch, the last items the customer added. The customer decides which item is discounted by adding it last. When the app can't know the order (a cart created with a Buy it now button or a direct checkout link), the cheapest item is discounted.
- **Cheapest item**: the discount always goes to the cheapest item of the batch, which protects your margin.
- **Most expensive item**: the customer can buy cheap items and get the most expensive one.

The example under the sentence shows what a batch costs the customer with your settings.

## Once per cart or on every batch

- **On every batch** (default): each full batch gives the reward again. With "buy 3, get 1 free", 8 items give 2 free.
- **Once per cart**: the reward is given once, whatever the number of items. With **Last item added**, it goes to the last item the customer added.

## What shoppers see

The bar counts the items of the selection, for example "2 items left for 1 free item". When the batch is complete, the bar is full and the discount shows on the line of the discounted item, in the cart and at checkout, under the tier's discount title. Shoppers have nothing to pick.

## Items that already have a discount

An item whose line already has a discount (a discount code or another automatic discount on the product, a Yaco gift) does not count toward the batch and is never discounted by the offer. A discount on the whole order does not remove the item. A compare-at price is not a discount: the item counts.

## Limits

- One **Buy X, get Y** tier per bar. To run two offers, give each one its own bar.
- No **Goal only** mode: the app always creates the discount. To keep a Buy X get Y discount set up in Shopify, use a text tier on an item bar.
- X and Y are the same in every market, and the set price follows the market's exchange rate. A market can still hide the tier (see [markets](https://www.yaco.studio/docs/markets)).

Discount not showing at checkout? See [discount not applied](https://www.yaco.studio/docs/discount-not-applied).
