Discountly documentation / Create discounts
Buy X get Y discounts
Give customers free items when they buy certain products with Discountly. Two worked examples (buy 2 get 1 free, and a free accessory), same-product and specific-variant rewards, incremental rewards, backup rewards and how the cart embed adds the free item.
A Buy X get Y discount gives customers free items when they buy certain products: buy 2 pairs of socks, get a third free; buy a camera, get a free strap. Discountly puts the free item in the cart for them, so they don't have to find it and add it. It's on the Starter and Pro plans.
This page covers what's specific to Buy X get Y. Creating a discount covers what every type shares. To give a gift when the cart reaches a subtotal instead, use the Free gift with purchase type.
How the free item gets into the cart
The cart embed checks the cart each time it changes. When the customer has bought enough, it adds the reward as its own cart line at $0, and takes it out again if the cart stops qualifying.
- Turn on the cart embed first. Without it, nothing is added. Store setup at the bottom of the Discounts page shows Needs attention if a live Buy X get Y discount needs it.
- The customer's own items stay full price. The reward is an extra item. With "buy 2, get 1", the customer adds 2 and the cart gets a third, free.
- The free quantity is locked. A customer can't raise the quantity of a free item. If they remove it, it isn't added back: see When a shopper removes the gift.
Buy X get Y discounts are automatic unless your store is on Shopify Plus, where they can use a code entered in Discountly's free-gift code field at checkout. See Checkout extensions.
Worked example: buy 2 pairs of socks, get 1 free
Every pair of socks counts. A customer who buys 2 pairs of the same socks gets a third pair of the same free, up to 3 free pairs per order.
- On the Discounts page, click Create discount and choose Buy X get Y.
- Title: "Buy 2 socks, get 1 free".
- Under Discount logic, click Add logic. In The offer, under Reward products, set Reward target to Same as trigger products.
- Set Customer buys quantity to 2 and Customer gets quantity to 1.
- Under Incremental rewards, tick Add more rewards as they buy more and set Maximum reward units to 3.
- In Who it applies to, choose Specific products and add the criterion Product type is any of "Socks". Click Save.
- Click Save rule, and check that the cart embed is On in Store setup.
What the customer gets, buying one color and size:
| Pairs bought | Free pairs added | Pays for |
|---|---|---|
| 1 | 0 | 1 |
| 2 or 3 | 1 | 2 or 3 |
| 4 or 5 | 2 | 4 or 5 |
| 6 or more | 3, the maximum | 6 or more |
With Same as trigger products, Discountly counts each variant on its own: 1 grey pair and 1 blue pair earn nothing, 2 grey pairs earn a free grey pair.
Worked example: free strap with a camera
Any camera earns one specific strap, free.
- Create a Buy X get Y discount titled "Free strap with any camera".
- Click Add logic. Set Reward target to Specific variants, click Select reward variants and pick the strap.
- Leave Customer buys quantity and Customer gets quantity at 1.
- Under Backup reward, tick Add a backup reward if the main is out of stock and pick another strap.
- In Who it applies to, choose Specific products with Product type is any of "Cameras". Click Save, then Save rule.
With Specific variants, every camera in the cart counts toward Customer buys quantity, whatever the model. Without incremental rewards, 1 camera or 3 cameras both get 1 strap.
The offer
| Field | What it does |
|---|---|
| Reward target | Specific variants: the variant you choose is the reward. Same as trigger products: the reward is a copy of what the customer bought |
| Select reward variants | With Specific variants. Out-of-stock variants are marked |
| Customer buys quantity | How many to buy to earn the reward. Default 1. With Same as trigger products it's counted per variant; with Specific variants, across all the products the logic matches |
| Customer gets quantity | How many free items. Default 1. Rewards are always free |
Only items the customer pays for count toward Customer buys quantity. Free items, from this discount or another Discountly discount, never count.
Incremental rewards
Without it, the reward is given once, however much the customer buys. Tick Add more rewards as they buy more to give the reward for every multiple: buy 2 get 1, buy 4 get 2, buy 6 get 3. Maximum reward units caps the free items per order; leave it blank for no limit.
Backup reward
With Specific variants, Add a backup reward if the main is out of stock picks a second variant. When the main reward is out of stock, the cart embed adds the backup. When both are, nothing is added. The Discounts list marks discounts whose reward is low or out of stock.
Excluding products from the reward
With Same as trigger products, tick Exclude products from the reward to keep some products from being given free, by Tags or Category (the product type). For example, sock gift boxes in the "Socks" type: exclude the tag gift-box and buying 2 boxes earns nothing free.
To leave products out of the offer entirely, use the exclusions in Who it applies to.
Display message
Customers see a message on the free line in the cart and at checkout. By default it's Free reward. Tick Customize the display message to write your own, such as "Third pair free".
Sale items and minimums
- Items already on sale: with Don't apply, items on sale don't count toward the reward. The reward is free either way, so the other two options don't change anything here.
- Minimum purchase requirements: Minimum quantity of items counts the matching items the customer pays for, never the free ones.
On the product page
To tell shoppers about the deal before they add to cart, add the Available offers block and, in the discount's Advanced settings, tick Include in available offers section on the Product Page. It's listed as Buy More, Save with the logic block's message. The cart embed's upsell hints (Pro plan) can show how many more to add.
Troubleshooting
The free item isn't added. Check that the cart embed is On, that the discount is live and automatic, and that the customer bought enough. With Same as trigger products, they need enough of one variant. Check the reward, or its backup, is in stock. If the customer removed the free item earlier, share the reset link.
The wrong reward was added. With Specific variants, only the first selected variant is added, or the backup when it's out of stock. Check the order of the variants in Select reward variants.
Customers ask why they can't add more free items. The free quantity is locked to what they've earned. Turn on incremental rewards to give more as they buy more.