---
title: "Product In Cart condition"
description: "Apply a discount only when certain products are in the cart, only when the cart contains nothing else, or only when they're missing."
url: https://jxngqfpxd.us.gleap.help/en/articles/15-product-in-cart-condition
collection: "Conditions"
updated: 2026-11-06
language: en
---

# Product In Cart condition

Apply a discount only when certain products are in the cart, only when the cart contains nothing else, or only when they're missing.

**In short:** **Product In Cart** checks whether chosen products are in the cart. **Contains** needs at least one of them, **Contains (strict)** needs the cart to hold only chosen products, and **Does not contain** needs none of them.

## Set it up

1.  Click **Add Condition** and pick **Product In Cart**. It's available as a Global Condition and on shipping discounts.
    
2.  Choose an operator:
    
    -   **Contains:** at least one of the chosen products is in the cart.
        
    -   **Contains (strict):** at least one chosen product is in the cart, and every other item in the cart is also a chosen product.
        
    -   **Does not contain:** none of the chosen products are in the cart.
        
3.  Click **Browse** and pick the products. To require specific variants, click the pencil icon next to a product and choose them.
    

![A Product In Cart condition set to Contains Merino Beanie](https://staticfiles.us.gleap.ai/p6ae440349b260bc5e19963ea/WcR9H93SdtwC3Hng7fHLsGwRLIMcyP8T2QT2w8YVx4SHIuSW0UiXjUh11Z2R1POgNO5gpKY3I6q.png "A Product In Cart condition set to Contains Merino Beanie")

## Worked examples

-   **Buy a beanie, get 20% off accessories:** Global Condition **Product In Cart** **Contains** Merino Beanie, plus a product discount of 20% on the Accessories collection.
    
-   **Free shipping on sample orders only:** on the shipping discount, **Product In Cart** **Contains (strict)** your sample products. A cart with only samples gets free shipping. Add any other item and it doesn't.
    
-   **Discount unless a gift card is in the cart:** **Product In Cart** **Does not contain** your gift card product.
    

![A shipping discount's Per-Discount Condition Product In Cart Contains (strict) Fabric Sample Pack, so only carts with nothing but samples get free shipping](https://staticfiles.us.gleap.ai/p6ae440349b260bc5e19963ea/aS6utLVcHoQQ4WTitFwZX05uacpY6PSC13dNVLwxOIDCb9WcX1MjmzbqG98BHjxcqH4egDdYhvr.png "A shipping discount's Per-Discount Condition Product In Cart Contains (strict) Fabric Sample Pack, so only carts with nothing but samples get free shipping")

## Good to know

-   If you chose specific variants, only those variants count as "in the cart". With **Contains (strict)**, the "nothing else in the cart" check is looser: other variants of a chosen product are allowed.
    
-   Product In Cart decides **whether** the discount applies. It doesn't decide **which items** get it. Use the product discount's **Target** for that.
    
-   Product In Cart isn't available on product or order discounts. Add it as a Global Condition instead, or put that offer in its own code.

## Related

- [Global conditions vs per-discount conditions](https://jxngqfpxd.us.gleap.help/en/articles/10-global-conditions-vs-per-discount-conditions.md)
- [Cart Subtotal, Cart Total and Cart Quantity conditions](https://jxngqfpxd.us.gleap.help/en/articles/11-cart-subtotal-cart-total-and-cart-quantity-conditions.md)
- [Group and Included Items conditions](https://jxngqfpxd.us.gleap.help/en/articles/12-group-and-included-items-conditions.md)
- [Customer Tag and Customer Segment conditions](https://jxngqfpxd.us.gleap.help/en/articles/13-customer-tag-and-customer-segment-conditions.md)
- [Shipping Country condition](https://jxngqfpxd.us.gleap.help/en/articles/14-shipping-country-condition.md)
