I am trying to have a overview page where I want to loop through all available product categories in separate rows. Somehow I was only able to achieve it when I specify the type of the product. That isn't ideal since I want the customer to be able to add new product types which will be displayed in a new row then.

Something like this :

{% set products = craft.commerce.products.type('all').find() %}

{% for 'type #1' in products %}
{% endfor  %}

{% for 'type #2' in products %}
{% endfor  %}


thanks a lot guys

1 Answer 1


Hoping this is what you are looking to do?

{% for productType in craft.commerce.productTypes %}

  {{ productType.name }}<br>

{% for product in craft.commerce.products.type(productType.handle).find() %}

  {{ product.title }}<br>

{% endfor %}

{% endfor %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.