Collections and filters
Tags and attributes are the data on a product. Conditions, filters and collections are the instructions that choose which products to show.
Condition
The condition is the smallest piece: one check on one field of the catalog.
| Checks | Operators |
|---|---|
| Tag value | =, != |
| Product name or variant name | =, !=, contains, startsWith, endsWith |
| Price, always with a currency and a cadence | =, !=, <, <=, >, >=, range |
| Attribute | the text and price operators, range included |
Filter
A filter is a group of conditions and the operator that joins them: AND (all must be true) or OR (at least one). A filter has a translated name, because it often appears on the site as the title of a section ("Filter by price"), and a position to order them.
A range condition, on a price or on a numeric attribute, has a min and a max. They tell the interface the limits (for the ends of a slider) and let it send the customer's choice to the API.
Collection
A collection is a filter saved under a name and a path: it divides the catalog into the sections of the site.
Collections nest, and a level adds to the ones above it: with Apparel / Shoes / Running, the visitor sees only the products that are Apparel AND Shoes AND Running. This makes the breadcrumbs, and the visitor never leaves the context they are in.
Any condition can define a section: Sale / Used cars / Under 100,000 km uses a <= on the Mileage attribute, and a Shock deals collection can combine a price range from €0 to €20 with an "Outlet" tag. Nothing is moved: to change a section, change its condition.
Inside a collection, everything else is added to it with AND: a text search ("Nike" in Running shoes finds only Nike running shoes), a tag value chosen in the sidebar, a price slider that acts only on the products the collection already selected.