Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

6.1 KB
Raw Blame
---
title: "Collections"
description: "Learn how to group products by hand or by rule in Spree Commerce."
---

A collection is a group of products shown together, such as a bestsellers shelf, a summer edit or a gift guide. Collections are a flat list rather than a tree, so a collection has no parent and no children.

A collection is filled in one of two ways. A **manual** collection holds the products you pick yourself. An **automatic** collection fills itself from rules you set, such as every product carrying a certain tag, and keeps itself up to date as your catalog changes. A collection also sets the order its products appear in, which can be a manual order you drag into place or an automatic one such as best selling or price.

Collections and [<u>categories</u>](/user/products/categories) are easy to confuse, and they do different jobs. Categories are the browsing tree customers navigate, filled by hand. Collections are the groups you assemble to sell, which can cut straight across that tree and can fill themselves. A product keeps its categories whatever collections it joins, and deleting a collection leaves its products in your catalog.

With a handful of products, picking favorites by hand is often enough. As the catalog grows, rules save the most work, because nobody has to remember to add each new product to each group.

To manage collections, navigate to **Products → Collections** in the admin dashboard.

## Reviewing Collections

![The Collections list with two automatic collections and one manual one](/docs/images/user/products/collections/1-collections-overview.png)

The list shows one row per collection.

| Column | What it means |
|---|---|
| **Name** | The collection's name, with the slug it uses in its web address beneath. |
| **Kind** | **Manual** if you pick the products, **Automatic** if rules pick them. |
| **Sorting** | The order the collection's products appear in. |
| **Products** | How many products are in the collection right now. |

Use the **Kind** filter to see only manual or only automatic collections. Click a collection's name to open it, or use the row menu for **Edit** and **Delete**.

## How to Create a Manual Collection

![The New collection form, with its name, description, default sorting and the rules switch](/docs/images/user/products/collections/2-new-collection-form.png)

A manual collection suits a group you want to choose yourself, such as a featured shelf or a gift guide.

1. Click **New collection** and enter a **Name**. **Save** is disabled until you do.
2. Leave **Set members automatically from rules** switched off.
3. Set **Default sorting** to the order the products should appear in, which can be manual, best selling, newest, price or name. A new collection starts on **Manual**.
4. Click **Save**.
5. In the **Products** card, click **Add products**, search your catalog, tick what you want, and click **Add**.
6. Click **Save** again.

<Warning>Closing the **Add products** window does not save anything. The products join the collection only when you click **Save** afterwards.</Warning>

With **Default sorting** set to **Manual**, drag the products in the card to set the order customers see.

## How to Create an Automatic Collection

![An automatic collection with two tag rules set to match any condition](/docs/images/user/products/collections/3-automatic-collection.png)

An automatic collection is worth setting up for any group you would otherwise keep up to date by hand.

Click **New collection**, enter a **Name**, and turn on **Set members automatically from rules**. The **Membership** card then holds one rule, built from three parts:

| Part | What it does |
|---|---|
| **Rule** | What the rule looks at. |
| **Condition** | How it compares, such as **is equal to** or **is not equal to**. |
| **Value** | What it compares against. Every rule needs one before the collection will save. |

Three kinds of rule are available:

- **Tag** - Matches the tags on a product. The value is the tag, written exactly as it is on your products. Whole tags only, so `cord` does not match a product tagged `cordless`.
- **On sale** - Matches whether a product is on sale. Use **is equal to** with `true` to gather what is on sale, or **is not equal to** with `true` for everything else.
- **Available on** - Matches products that became available within a number of days, so a value of `30` gathers what arrived in the last month. This is how a New Arrivals collection keeps itself current.

Click **Add rule** for a second rule, and **Remove rule** to take one away. Then click **Save**, and the **Products** card lists every product matching the rules.

### Matching All Conditions or Any Condition

With two or more rules, **Products must match** decides how they combine.

- **all conditions** keeps only products passing every rule, so the collection narrows with each rule you add.
- **any condition** takes products passing at least one rule, so it widens.

A `compact` tag rule and a `fan` tag rule gave one product on **all conditions** and six on **any condition**. Change the setting and save, and the product list updates straight away.

## How to Add a Product to an Automatic Collection

Products are not added to an automatic collection directly. Give the product what the rules look for instead: for a tag collection, open the product, type the tag into its **Tags** box, and click **Save product**.

<Note>Changing a collection's own rules updates its products as soon as you save. Changing a product updates the collections it belongs to a short while later, so reload a collection you already have open to see the new count.</Note>

## How to Delete a Collection

Choose **Delete** from the collection's row menu and confirm.

The products that were in it are untouched apart from no longer belonging to it, so deleting a collection is a safe way to retire a seasonal group.

## Further Reading

- [<u>Categories</u>](/user/products/categories) - The browsing tree customers navigate
- [<u>Adding Products</u>](/user/products/adding-products) - Where you add the tags automatic collections look for
- [<u>Products</u>](/user/products/products) - Adding many products to a collection at once
- [<u>Media</u>](/user/products/media) - The images a collection shows