Collections of products : which TV for which template to link to Commerce?


After reading the docs, I’m confuse to set up a Collection of (single) products.
I’d like to setup a catalog collection where 1 resource = 1 product.

The section * Recommended: Products TV + Collections* ( says :

To connect it with the products stored in Commerce, you would then use the Products Template Variable. This is a TV input type provided by Commerce, which allows you to link products to your catalog pages. This can be configured to allow a single product per resource, but also to hold many products, so you can easily add different variations of a product to the same page in your catalog. The TV provides a comma separated list of product IDs…

Does it mean the Products Template Variable should be associated to the single product template or associated to the Collection template hosting single product resources ?

Single product template. On the product resource you can then add the product info (price, stock, etc) into the TV, and render that with the commerce.get_product(s) snippet.

On the collection template you can also retrieve that same product information from subresources when rendering them through get/pdoResources, again with the same commerce.get_product(s) snippet.