I have a page which contains hard coded collection links. Due to the complexity of the collection structure, they had to be hard coded inside a template. What I’d like to know is whether it’s possible to display the product count for a set collection on this page?
The current layout of the collection template looks something like this
Title
Blocks of sub-collections to further filter down (There are around 8 of these and are hard coded into a template)
List of products in the parent collection
Using the layout above as an example, in some cases I may only have 3 products in the entire parent collection. Meaning some of the sub-collections are going to be empty. What I’d like to be able to do is to hide some of these if their product count is empty. This is what I’m struggling with. I’ll need to wrap a conditional around every sub-collection block but I would need to somehow define or assign the collection in order to test the conditional. But because the blocks are not dynamic, they have no real ‘link’ to a collection.
Does anyone have any advice on what I could do here? Any help much appreciated.