> For the complete documentation index, see [llms.txt](https://responsive-media.gitbook.io/advanced-free-shipping/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://responsive-media.gitbook.io/advanced-free-shipping/conditions-products/collection-in-cart.md).

# Collection in Cart

## Overview

The **Collection in Cart** condition applies discounts when the cart contains products from specific collections. This is easier than selecting individual products when you want to promote an entire collection.

## Available Operators

* **Contains (any)**: Cart has at least one product from selected collection(s).
* **Contains (only)**: Cart contains ONLY products from selected collection(s).
* **Does not contain**: Cart has NO products from selected collection(s).

## Operator Details

### Contains (any) - Most Common

**Use when**: Any product from the collection should trigger the discount

**Example**: Select "Summer Collection"

* Cart with 1 summer item → ✓ Qualifies
* Cart with 2 summer items + 1 winter item → ✓ Qualifies
* Cart with only winter items → ✗ Doesn't qualify

### Contains (only)

**Use when**: Cart must have ONLY items from selected collections

**Example**: Select "Clearance"

* Cart with 2 clearance items → ✓ Qualifies
* Cart with 1 clearance + 1 regular item → ✗ Doesn't qualify

### Does not contain

**Use when**: Exclude collections from discount

**Example**: Select "Clearance"

* Cart with regular items → ✓ Qualifies
* Cart with clearance items → ✗ Doesn't qualify

## Common Use Cases

{% tabs %}
{% tab title="Collection Promotion" %}
**Free shipping on summer collection**

* Collection in cart **contains (any)** "Summer Collection"
* Discount: Free shipping
  {% endtab %}

{% tab title="Clearance Only" %}
**Flat $5 shipping on clearance-only orders**

* Collection in cart **contains (only)** "Clearance"
* Discount: $5 flat rate
  {% endtab %}

{% tab title="Exclude Collection" %}
**Free shipping except on sale items**

* Collection in cart **does not contain** "Sale"
* Cart total **is at least** $50
* Discount: Free shipping
  {% endtab %}

{% tab title="Multiple Collections" %}
**Free shipping on seasonal collections**

* Collection in cart **contains (any)** "Summer", "Spring"
* Discount: Free shipping
  {% endtab %}
  {% endtabs %}

## Selecting Collections

1. Click "Select collections"
2. Search for collections by name
3. Select one or more collections
4. Selected collections appear as chips

{% hint style="info" %}
You can select multiple collections. With "Contains (any)", having products from ANY selected collection qualifies.
{% endhint %}

## Best Practices

{% hint style="info" %}
Use collections instead of individual products when promoting categories or seasonal items.
{% endhint %}

{% hint style="info" %}
"Contains (any)" is most flexible - use it for most collection promotions.
{% endhint %}

{% hint style="info" %}
For quantity or value thresholds within collections, use [Collection Item Quantity](/advanced-free-shipping/conditions-products/collection-item-quantity.md) or [Collection Item Cost](/advanced-free-shipping/conditions-products/collection-item-cost.md) instead.
{% endhint %}

## Related Conditions

* [**Collection Item Quantity**](/advanced-free-shipping/conditions-products/collection-item-quantity.md): Require specific quantity from collection
* [**Collection Item Cost**](/advanced-free-shipping/conditions-products/collection-item-cost.md): Require minimum spend from collection
* [**Product in Cart**](/advanced-free-shipping/conditions-products/product-in-cart.md): Target specific products instead


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://responsive-media.gitbook.io/advanced-free-shipping/conditions-products/collection-in-cart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
