How do I build a simple Product Catalog?

I’m building a Product Catalog which consists of three parts templates
Product Collections, Product List and Product which can be used like this:

  • $site
    • Product Collections
      • Product List
        • Product
        • Product
      • Product List
        • Product
        • Product
    • Product List
      • Product
      • Product

I want Product Collections to be flexible in a way that products can belong to multiple collections, a collection can have a Collection Image and a certain collection can be marked as catch all, holding all products from sibling product lists (Collections).

In my product.yml I have:

        label: Collections
        type: checkboxes
        options: query
            page: ../../
            fetch: children
            value: '{{uid}}'
            text: '{{title}}'
            template: product-list
        columns: 4

To me there's three possible ways that I can define my Product Collections:

1. **Folder structure** (and conditional checkboxes on the Product to specify which product lists it should belong to)
2. **Tags**
3. **Structured fields** (maybe?)

I'm currently venturing down the first option, for simplicity and easy Product List (collection) metas like image and Catch All (Show all products) -toggle but now I'm afraid it falls short in terms of having this option unnecessarily available in the Collections checkboxes for the product (i don't think it's possible to define it and filter it out) also as the file structure isn't unnecessarily being enforced as products can belong to multiple collections (Product List parent pages) it doesn't feel completely right and easily navigable anymore.

**Which route would you pick to achieve what I'm trying to do here?** :blush:

What is a product list as compared to a product collection? Why is the third product list on another level than the first two?

Sorry Product Collection should’ve been in plural: Product Collections

My idea here is that Product List children of a Product Collections defines the Product Collections - if a Product List is on its own it’s just a regular Product List.

Product Collections: A list of product collections
Product List: A list of products

I still don’t really understand it, but I have a feeling that I’d rather go for a symmetric approach, having all the product lists on the same level and create the collections from fields in the product blueprint. It would make it more flexible and easier to fetch products if the requirements change.

I guess that is exactly what I’m doing here actually :blush:

Okay so for my collection checkboxes in my product blueprint, for the query option I can filter out this products parent Product List with

fetch: siblings

as that option is self explanatory from its placement in the file structure.

That’s pretty nice - then I just have to figure out a way to get rid (filter out) of the option for the sibling Product List which can be marked to contain all the products, or rethink its definition.

Oh that could be solved with a new template as my collection checkboxes query option has

template: product-list

So making a explicit product-list-all template solved it.

I think I got my usecase covered pretty nicely here - damn I love this stuff! :sunny: :heart_eyes: