Skip to content

Buy X Get Y

A Buy X Get Y discount gives reward items away free, or at a discount, once the customer has bought enough qualifying items. You describe the qualifying items in Customer Buys, the reward items in Customer Gets, and how much the reward is worth in Discount Configuration.

  1. Open Discounts, click Create discount, and choose Buy X Get Y.

    It sits in the Discounts section of the create menu, with the example “Buy 2, get 1 free”.

  2. Choose the discount method and name the discount.

    Pick Automatic or Discount Code, then fill in Title (automatic) or Discount Code (code). The Summary on the right keeps a running recap of what you have set.

    The Create Buy X Get Y Discount page with the Discount method card set to Automatic, the Title field reading Buy 2 get 1 free, the Customer Buys card with an empty rules builder and an Add your first rule button, and the Summary card on the right
  3. Set what the customer must buy.

    In Customer Buys, click Add your first rule to create RULE GROUP #1 and pick a condition, an operator and a value — for example Specific collections · is one of · T-shirts. Then set Minimum quantity of items customer must buy. At least one rule is required here.

  4. Set which items are the reward.

    In Customer Gets, add at least one rule the same way — for example Specific collections · is one of · Socks. These are the items the discount takes money off.

  5. Set the reward quantity, the discount type and the value.

    In Discount Configuration, enter Quantity of items customer gets, choose Discount type, and fill in the value it reveals. Then set Maximum uses per order and Sort get items for discount.

    The Discount Configuration card with Quantity of items customer gets 1, Discount type Free with the green Customers will get the items for free banner, Maximum uses per order set to Limited with Maximum number of uses 1, Sort get items for discount set to Higher-priced items first, and the unticked Add Tiers To This Discount checkbox
  6. Set combinations, purchase type, markets and dates, then save.

    Choose which other discounts this one may combine with, which purchase types it covers, which markets it runs in, and when it starts and ends. Save from the bar at the top of the page.

Automatic needs no code — Shopify applies the discount as soon as a cart matches. Discount Code means the shopper has to enter the code you set. Choose the method when you create the discount: the chooser is disabled once the discount exists.

On an automatic discount, Title is the name shoppers see when the discount is applied. On a code discount the field becomes Discount Code.

Adds a second name only you see, to tell similar discounts apart.

The rules that decide which cart items count toward the purchase requirement. A Buy X Get Y discount can use Specific products, Specific variants, Specific collections, Product tags, Line quantity, Line subtotal, Line attribute and Has selling plan — item conditions only, no cart or customer conditions. At least one rule group is required.

Conditions inside a group join with the Between conditions AND/OR toggle; groups join with Match All Rule Groups or Match Any Rule Group — see How rule groups combine below.

Minimum quantity of items customer must buy

Section titled “Minimum quantity of items customer must buy”

How many qualifying items must be in the cart before the reward is given. A whole number greater than 0. Hidden while Add Tiers To This Discount is on, because each tier carries its own buy quantity.

The rules that decide which cart items are the reward. Same condition list as Customer Buys, and at least one rule group is required. Nothing is added to the cart for the shopper — the discount takes money off reward items that are already there.

Buy X Get Y builds its qualifying items from every rule group at once — a group only ever adds items, groups never narrow each other. The AND/OR between groups decides whether the discount runs at all: with Match All Rule Groups, every group must match something in the cart; with Match Any Rule Group, one is enough. That leads to three shapes worth knowing:

  • A requirement that should narrow a selection goes in the same group, with Between conditions set to AND. In collection A AND Line quantity is at least 6 covers only the lines that are both.
  • A requirement alone in its own group applies to everything. [In collection A] plus [Line quantity is at least 6] as two groups pulls in every line that satisfies either one.
  • “One from each category” is separate groups joined with Match All Rule Groups — a shirt group and a trouser group. Putting both collections in one AND group instead asks for a single product that is in both, which usually matches nothing.

How many reward items the customer receives per qualifying set. A whole number greater than 0.

How much the reward items are worth:

  • Percentage off — a share off each reward item.
  • Fixed amount off — one amount spread across the reward items.
  • Fixed amount off per item — that amount off each reward item.
  • Free — the reward items cost nothing.

Changing the type clears the value you had entered for the previous one.

Percentage / Amount off (total) / Amount off per item

Section titled “Percentage / Amount off (total) / Amount off per item”

The value for the type you chose. It must be greater than 0, and a percentage may not go above 100. Free needs no value.

Unlimited applies the discount as many times as the cart qualifies — a cart with six qualifying items on a “buy 2 get 1” offer gets three rewards. Limited reveals Maximum number of uses, a whole number greater than 0, and stops at that many per order. The default is Unlimited.

Which reward items get discounted first when more items qualify than the reward quantity covers. Higher-priced items first (the default) gives it to the most expensive qualifying items; Lower-priced items first gives it to the least expensive.

Turns the single buy/get pair into a ladder. Each tier has Customer buys quantity, Customer gets quantity, Discount type, its value, and an optional Message (optional). Up to 10 tiers; the heading counts them, and Add tier disappears at 10. While tiers are on, the single-offer quantity and value fields are hidden — Sort get items for discount still applies to every tier.

Ticks for Product discounts, Order discounts and Shipping discounts. Leave them off and this discount runs alone; tick a box and Shopify may apply that kind of discount alongside it.

Only shown for a discount code. Limit number of times this discount can be used in total adds a Maximum discount uses field (a whole number greater than 0), and Limit to one use per customer caps it per shopper.

One-time purchases, Subscription products, or both — at least one is required. Ticking subscriptions adds a choice of First payment only, Limited number of payments (up to 100) or All recurring payments.

Apply to all markets covers every current and future market. Apply to specific markets lets you pick up to 20; at least one is required once you switch to it.

Start Date and Start Time say when the discount begins, and Set End Date adds an end. All times are in your store’s timezone, which the card names on screen.

Buy 2, get 1 free

Discount method: Automatic
Title: Buy 2 get 1 free
Customer Buys → RULE GROUP #1 → Specific collections · is one of · T-shirts
Minimum quantity of items customer must buy: 2
Customer Gets → RULE GROUP #1 → Specific collections · is one of · T-shirts
Quantity of items customer gets: 1
Discount type: Free
Maximum uses per order: Unlimited
Sort get items for discount: Lower-priced items first

Buy 3 shirts, get a pair of socks at 50% off, once per order

Discount method: Automatic
Title: Shirts and socks · 50% off socks
Customer Buys → RULE GROUP #1 → Specific collections · is one of · Shirts
Minimum quantity of items customer must buy: 3
Customer Gets → RULE GROUP #1 → Specific collections · is one of · Socks
Quantity of items customer gets: 1
Discount type: Percentage off
Percentage: 50
Maximum uses per order: Limited
Maximum number of uses: 1

A ladder: buy more, get more

Discount method: Automatic
Title: Mix and match ladder
Customer Buys → RULE GROUP #1 → Specific collections · is one of · Candles
Customer Gets → RULE GROUP #1 → Specific collections · is one of · Candles
Add Tiers To This Discount: ticked
Tier 1 → Customer buys quantity: 2 · Customer gets quantity: 1 · Discount type: Percentage off · Percentage: 25
Tier 2 → Customer buys quantity: 4 · Customer gets quantity: 2 · Discount type: Free

A code for a bundle-style reward

Discount method: Discount Code
Discount Code: SOCKS50
Customer Buys → RULE GROUP #1 → Specific collections · is one of · Shoes
Minimum quantity of items customer must buy: 1
Customer Gets → RULE GROUP #1 → Specific collections · is one of · Socks
Quantity of items customer gets: 1
Discount type: Fixed amount off per item
Amount off per item: 5
Limit to one use per customer: ticked

An automatic Buy X Get Y discount needs nothing from the shopper: once the cart holds enough qualifying items and at least one reward item, Shopify applies the discount in the cart and shows the Title you typed next to the saving. A code discount applies once the shopper enters the code you set.

The reward items are never added for the shopper — they have to be in the cart already for the discount to have anything to take money off. With Free, the reward items stay in the cart and their price drops to nothing.

  • Percentage: greater than 0, at most 100 — refused inline and again on the server.
  • Quantities: whole numbers greater than 0, both for the buy quantity and the get quantity.
  • Tiers: up to 10 per discount.
  • Maximum number of uses per order: a whole number greater than 0, and only when Maximum uses per order is Limited.
  • Markets: up to 20 when you pick specific markets.
  • Subscriptions: up to 100 recurring payments when you choose a limited number.
  • Conditions are item-level only. There are no cart-total or customer conditions in the buy and get rules — use Multi-offer if you need a cart or customer gate alongside a buy-and-get offer.
  • Combinations are Shopify’s call. Ticking a box in Discount can be combined with tells Shopify this discount may run alongside that kind; Shopify decides what actually applies.
  • The method is fixed after creation. Automatic and Discount Code cannot be swapped on an existing discount; duplicate it instead.

Why does my discount give away more items than I expected? Almost always because a requirement sits in its own rule group. The rule groups are added together, so a group holding only Line quantity is at least 6 matches every line in the cart. Put the requirement in the same group as the selection it narrows, with Between conditions set to AND.

I put two collections in one rule group with AND and nothing is discounted. Why? Conditions joined with AND inside one group must all be true of the same cart line, so that shape asks for one product that is in both collections. For “either collection”, use one Specific collections condition listing both, or set Between conditions to OR. For “one from each”, use a separate rule group per collection and Match All Rule Groups.

Can the same item count as both a buy item and a reward item? Yes, if it matches both selections. Point Customer Gets at a different collection or product if you do not want that.

How many tiers can one discount have? Up to 10. The heading shows the count, and Add tier disappears once you reach 10.

  • Gift with purchase — when the reward should be added for the shopper rather than discounted in place.
  • Product discount — money off qualifying items with no purchase requirement.
  • Multi-offer — several offers, and cart or customer conditions, in one discount.
  • Where discounts show — automatic discounts versus discount codes.