The short answer

Shopify has a built-in Buy X get Y discount. In your Shopify admin, go to Discounts, click Create discount and choose Buy X get Y. You set what the customer buys, what they get and the discount on it: a percentage, an amount off each item, or free.

Two things are easy to miss. Shopify never adds the free item to the cart for the shopper, and it doesn't announce the offer on your product page. So the setup has two parts: the discount, and a clear message next to the buy button.

Key takeaways

  • With Shopify's discount, shoppers must add the free item themselves.
  • State the offer in plain words on the product page, next to the buy button.
  • Decide whether the offer may combine with other discounts before you launch.
  • Test the cart with the exact items a shopper would add.

How Buy X get Y works on Shopify

A Buy X get Y discount has two sides. Customer buys sets the condition: a minimum quantity of items or a minimum purchase amount, from products or collections you pick. Customer gets sets the reward: a quantity of products at a discounted value. Typical offers are "buy 2, get 1 free" or "buy a jacket, get a scarf at half price".

You can run it as a discount code or as an automatic discount. Shoppers enter a code at checkout. An automatic discount applies once all qualifying items are in the cart.

How to create a Buy X get Y discount in Shopify

  1. In your Shopify admin, go to Discounts and click Create discount.
  2. Choose Buy X get Y.
  3. Under Method, pick Automatic discount and enter a title, or pick Discount code and enter the code.
  4. Under Customer buys, choose Minimum quantity of items or Minimum purchase amount. Then pick the products or collections that count.
  5. Under Customer gets, enter the quantity and pick the products or collections. Under At a discounted value, choose Percentage, Amount off each or Free.
  6. Optional: limit how many times the reward can apply in one order.
  7. Set Eligibility, Combinations and Active dates, then click Save.

Shopify's help page on Buy X get Y lists the limits. Customer buys and Customer gets each take up to 100 products. If the free product runs out of stock, it shows as sold out. Discounts made in the admin don't apply on the post-purchase page at checkout. Start and end times follow the time zone set in your admin.

How to show the offer without an app

  1. Write the offer in one plain line that says what to add, such as "Buy 2, get 1 free: add 3 to your cart."
  2. Add the line to your announcement bar in the theme editor, so it shows on every page.
  3. On the product page, add a Text element inside Product information, close to the buy button, with the same line.
  4. If you use a code, show the code in that line too.
  5. Add the items to a cart yourself and check the discount before the offer goes live.

How Sternify shows Buy X get Y on the product page

Sternify gives you two ways. You can keep Shopify's discount and present its code clearly, or run the offer as a Sternify bundle that adds the free item for the shopper.

Show your Shopify discount code

  1. Create the Buy X get Y discount code in Shopify, as above.
  2. In the theme editor, open Product information, click Add and pick Sternify's Discount Code under Apps.
  3. Write the Promotion Title and Promotion Text, and enter your code under Discount Code.
  4. Keep Copy Discount Code Function on, so shoppers copy the code with one click.

For a message on every page, a Sternify banner can carry the same code as its call to action, on all pages or on product pages only.

Run it as a bundle that adds the free item

  1. In Sternify, open Modules, then Bundles, and click Create Bundle. Choose Quantity Breaks + Free Gifts, or start from scratch.
  2. Under Product Selection, choose the products the offer shows on.
  3. In an offer, set the Quantity the shopper buys, for example 2.
  4. Click Free gifts and select the gift. Pick the same product for "buy 2, get 1 free", or another product for "buy X, get Y". Set the gift's quantity and label.
  5. Style the offers, publish the bundle and add Sternify's Bundle to Product information in the theme editor.

When a shopper picks that offer and adds it to the cart, Sternify adds the free item too. The discount applies in the cart and at checkout through Sternify's own Shopify discount, so you don't create a separate one. You can also describe the offer in plain words, such as "buy 2, get 1 free", and let Sternify's AI set up the bundle.

For a gift that unlocks at a cart total instead, read our guide to free gifts with purchase on Shopify.

Tips

  • Name the reward in the offer line. "Get the travel case free" is clearer than "free gift".
  • Set Combinations on purpose, so the offer doesn't stack with a store-wide code by accident.
  • Check the free item's stock before a busy weekend or a campaign.
  • See how competitors present their offers with the comparison tool.

Mistakes to avoid

  • Saying "buy 2, get 1 free" without telling shoppers to add all three items.
  • Showing the offer only in the cart, where shoppers see it too late.
  • Picking a collection for Customer gets that includes expensive items you didn't mean to give away.
  • Forgetting an end date for an offer that should end.