How to solve this problem with a hierarchy of categories?
Please do not solution, but more of a push in the right direction, or rather such a nice pink.
The task is the following:
We have a category with subcategories (unlimited). At first only visible to the main category by clicking on category opens its subcategories (with the help of ?group = ...) (others closed), etc.
Just next to the categories and subcategories, display the values of number of products that belong to these categories.
I think so. Is it right or stupid?
1) take out the entire list of categories, and depending on $_GET['group'] make an array of parents. Then reverse the array has to start with the root category.
2) Due to the first action to build a category tree
3) Looking at each visible to the customer category number of products