---
title: "Free shipping only when the cart has discounted products"
description: "Make shipping free (or cheaper) only when the product discount in the same code applies, for example only when the cart has accessories."
url: https://docs.onecodediscounts.com/en/articles/30-free-shipping-only-when-the-cart-has-discounted-products
collection: "Recipes"
updated: 2026-11-06
language: en
---

# Free shipping only when the cart has discounted products

Make shipping free (or cheaper) only when the product discount in the same code applies, for example only when the cart has accessories.

**In short:** Add your product discount, then a **Shipping Discount** with the Per-Discount Condition **Match Another Discount's Rules**, and tick the product discount. Shipping is then only discounted when the product discount applies.

**Why one code:** Shopify's own free shipping discounts can't check whether another discount applies, and a code holds only one kind of discount. OneCode: Stackable Discounts ties the two together in one code.

## Example

Code SHIPSAVER: 10% off Accessories, plus 50% off Express Shipping, but only when the cart has accessories.

## Steps

1.  Click **Create discount** and enter `SHIPSAVER`.
    
2.  Click **Add Discount Type**. Enter `10` in **Percentage**, set **Target** to **Specific Collections** and pick Accessories.
    
3.  Click **Add Discount Type**. Set **Discount Type** to **Shipping Discount**, **Value Type** to **Percentage** and enter `50`.
    
4.  Under **Rate Selection**, click **Select Rates** and add `Express Shipping`.
    
5.  Under the shipping discount's **Per-Discount Conditions**, click **Add Condition** and choose **Match Another Discount's Rules**.
    
6.  Tick "Product — 10% OFF · Accessories".
    
7.  Click **Save discount**.
    

![A 50% Express Shipping discount that matches the 10% Accessories product discount](https://staticfiles.us.gleap.ai/p6ae440349b260bc5e19963ea/4HLy9uOppOvk7mIKZaRbUV6U6BGzSz5KVoGGmTYLXj12miuQ75OQ6geHYXMdZLCVcS1b0JN6BAe.png "A 50% Express Shipping discount that matches the 10% Accessories product discount")

## What the customer gets

-   Cart with a tote from Accessories: 10% off the tote and half-price Express Shipping.
    
-   Cart without accessories: no discount at all. Without step 5, shipping would still be half price.
    

## Good to know

-   The shipping discount follows everything about the product discount: its target, exclusions and conditions. Change the product discount and the shipping rule follows.
    
-   Use **Free Shipping** and **All Rates** for plain free shipping.
    
-   More detail: [Free shipping only when another discount applies](https://jxngqfpxd.us.gleap.help/en/articles/16).

## Related

- [A different discount for each collection in one code](https://docs.onecodediscounts.com/en/articles/26-a-different-discount-for-each-collection-in-one-code.md)
- [Spend $100, get 20% off and free shipping](https://docs.onecodediscounts.com/en/articles/27-spend-dollar100-get-20percent-off-and-free-shipping.md)
- [Buy more, save more: quantity tiers (buy 2, 3 or 4)](https://docs.onecodediscounts.com/en/articles/28-buy-more-save-more-quantity-tiers-buy-2-3-or-4.md)
- [Spend more, save more: spending tiers](https://docs.onecodediscounts.com/en/articles/29-spend-more-save-more-spending-tiers.md)
- [Buy one, get one free (BOGO)](https://docs.onecodediscounts.com/en/articles/31-buy-one-get-one-free-bogo.md)
