# Free gift with purchase on Shopify, when the customer adds the gift

With [OneCode: Stackable Discounts](https://apps.shopify.com/rm-combo-discounts), you can make a gift product free once the customer spends a minimum, and give free shipping on the same discount. The customer adds the gift to their cart, and the discount takes it to $0 at checkout. OneCode doesn't add the gift to the cart, so tell customers about it on your product pages, cart or announcement bar.

## Example

A $20 tote is free, and shipping is free, when the customer spends $100 on other products.

- $110 of products plus the tote ($130 cart): the tote is free and shipping is free. The customer pays $110.
- $110 of products without the tote: shipping is free.
- $90 of products plus the tote ($110 cart): shipping is free, but the tote is full price, because the cart is under $120.

![A $130 cart with the automatic discount Free tote and shipping over $100: a $60 shirt and $50 trousers at full price, the $20 tote at $0, shipping free instead of $8, and a total of $110](/images/checkout-gift.png)

![A $110 cart with the same discount: a $50 shirt, $40 trousers and the $20 tote all at full price, shipping free instead of $8, and a total of $110](/images/checkout-giftshort.png)

## Set it up

1. In OneCode, click **Create discount** and choose **Automatic discount**. Enter a **Title** such as `Free tote and shipping over $100`. Customers see the title next to the free gift. Choose **Discount code** instead if customers should type a code.
2. Click **Add Discount Type**. Leave it as a **Product Discount**, and enter `100` in **Percentage**. Set **Target** to **Specific Products** and pick the tote.
3. Click **Add quantity limit** and enter `1` in **Quantity Limit**.
4. Under that discount type's **Per-Discount Conditions**, click **Add Condition**. Set **Field** to **Cart Subtotal**, **Operator** to **Greater than or equal to** and **Value** to `120`.
5. Click **Add Discount Type**, set **Discount Type** to **Shipping Discount** and keep **Free Shipping**. Add the condition **Cart Subtotal** **Greater than or equal to** `100`.
6. Click **Save discount**.

## Why the gift needs $120, not $100

**Cart Subtotal** includes the gift's own price. With a threshold of $100, a customer could spend $80 and add the $20 tote to reach $100. Setting the threshold to your minimum plus the gift's price keeps the minimum at $100 of other products. Free shipping stays at $100, so customers who don't add the tote still get it.

## Good to know

- If a customer adds two totes, one is free and the other is full price.
- If the same discount also gives 10% off all products, the tote still gets 100% off. Each item gets the product discount that saves the most.
- The gift must be a product customers can add to their cart in your online store.

## Choose one of several gifts

Under **Specific Products**, pick every gift product. The quantity limit of 1 makes only one of them free, the cheapest one by default. Set the **Cart Subtotal** threshold using the most expensive gift's price, so no gift can push the cart over the minimum.

## A gift when they buy a specific product

Instead of a **Cart Subtotal** condition, add a **Global Condition**: **Product In Cart**, **Contains**, and pick the product they need to buy. The gift is then free whenever that product is in the cart. A Global Condition applies to the whole discount, so the free shipping also needs that product in the cart. See [buy this, get that](/guides/discount-when-product-in-cart.md).

Shopify's own Buy X Get Y discount only discounts the item the customer gets, so free shipping would be a separate discount. With OneCode, the gift and the free shipping are one discount.

OneCode costs $9.90 USD every 30 days after a 7-day free trial, billed by Shopify. [Install it from the Shopify App Store](https://apps.shopify.com/rm-combo-discounts).
