# Shopify bundle discount when products are bought together

To discount products only when they're bought together, use [OneCode: Stackable Discounts](https://apps.shopify.com/rm-combo-discounts). Add a **Product Discount** that targets the bundle's products, then add one **Cart Contains** condition for each product. Conditions in the same list must all be met, so the discount applies only when every product is in the cart. The customer adds each product to the cart as usual. OneCode discounts them at checkout; it doesn't create a bundle product or a bundle listing in your store.

## Example

25% off the Classic Cotton Tee and the Canvas Tote Bag when both are in the cart.

- A $40 tee and a $20 tote: the tee is $30 and the tote is $15. The customer pays $45 instead of $60, $15 saved.
- A $40 tee on its own: no tote, so no discount.
- Two tees and no tote: still no discount.

At checkout, the customer sees the code, or the automatic discount's title, next to each discounted item.

![TEEANDTOTE at checkout. The $40 Classic cotton tee is $30, the $20 Canvas tote bag is $15, the subtotal is $45, shipping is $8 and the total is USD $53.00.](/images/checkout-bundle.png)

## Set it up

1. In OneCode, click **Create discount**. Choose **Discount code** and enter a code such as `TEEANDTOTE`, or choose **Automatic discount** and give it a **Title** such as `Tee and tote bundle`.
2. Click **Add Discount Type**. Keep **Product Discount** and **Percentage**, and enter `25` in **Percentage**.
3. Set **Target** to **Specific Products**, click **Browse**, and pick the Classic Cotton Tee and the Canvas Tote Bag.
4. Under **Per-Discount Conditions**, click **Add Condition**. Set **Field** to **Cart Contains**, keep **Contains** and **Specific Products**, click **Browse** and pick the Classic Cotton Tee.
5. Click **Add Condition** again. Set **Field** to **Cart Contains**, keep **Contains** and **Specific Products**, and pick the Canvas Tote Bag.
6. Click **Save discount**.

![The OneCode editor for the code TEEANDTOTE: a 25% Product Discount targeting the Classic Cotton Tee and the Canvas Tote Bag, with two Per-Discount Conditions, Cart Contains the Classic Cotton Tee and Cart Contains the Canvas Tote Bag](/images/editor-bundle.png)

Don't use **Group Quantity** at least `2` instead of the two **Cart Contains** conditions. Two tees would meet it, which isn't a bundle.

## Why two conditions, not one

**Cart Contains** with **Contains** needs at least one of the chosen items. If you pick both products in one condition, a tee on its own is enough. One condition per product makes each one required. For a three-product bundle, add three conditions.

## Variations

- **Any tee plus any bag:** in each condition, choose **Specific Collections** under **Items** and pick the collection, for example Tees in one and Bags in the other. Set **Target** to the same collections. A product counts if it's in any chosen collection.
- **A product plus anything from a collection:** use one condition with **Specific Products** and one with **Specific Collections**. Each condition picks either products or collections.
- **$10 off the bundle, once:** instead of a product discount, add an **Order Discount** with **Fixed Amount** `10` and the same two **Cart Contains** conditions. It comes off the order subtotal once. A product discount with a fixed amount takes the amount off each targeted item instead.
- **Free shipping with the bundle:** add a **Shipping Discount** with **Free Shipping**, and give it the condition **Match Another Discount's Rules** with the bundle discount ticked. Shipping is free only when the bundle applies.

A [Shopify discount code](https://help.shopify.com/en/manual/discounts/discount-methods/discount-codes) holds one kind of discount, so the bundle price and free shipping would be two codes. With OneCode they're one.

## Things to check before you launch

- Once both products are in the cart, every tee and tote in the cart gets 25% off. A tee and two totes pay $30 + $15 + $15 = $60. To cap it, click **Add quantity limit**. The limit counts items, not pairs: with `2` and **Cheapest items first**, that cart discounts the two totes and leaves the tee at $40.
- If you only want some variants in the bundle, click the pencil icon next to the product in the condition and choose them. Only those variants then count as in the cart.
- If a bundle product is on sale, it gets 25% off its sale price unless you add a sale item rule. See [full-price and sale items](/guides/sale-items.md).
- To give a different discount when only one of the products is bought, add a second product discount with its own rules. Each item gets the best product discount it qualifies for, never both. See [buy X, get Y](/guides/buy-x-get-y.md) for one product unlocking a discount on another.

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).
