Shopify collections OR categories are having a great flexibility of being used. Shopify offers a very rich “collection” object that we can use to get the various details of Collection on Collection pages.
Collection objects has total 20 attributes available that can be used on Collection pages to display/get various properties of Collections.
Now coming our original question, how we can get current collection on collections page? Below tag can be used to display name of current collection on collection pages
{{ collection.products }}
How to get all products of current collection on collections page?
{{ collection.products }}
Now what if you just need to display number of products available in Collection? Don’t worry, you can do it using below tag:
{{ collection.all_products_count }}