Suppose my website has the following category tree:
- sub_cat_1_1 (id = 1234)
well, what I need is a function (let's call it getSubcatTree(id) ) which once is called passing a certain category ID as a parameter, it returns the whole products collection belonging to that category's tree (with the given category as starting node)
Still considering the above example, I should call the function like this:
and it should returns me a products collection consisting of all the products located in any subcategory (and recursively on their sub-subcategories) down from the given node.
This means all the products located in :
A function - let's call it for example getManuCollection(collection) - which returns a collection of all the names of the brands of a given products collection (passed as a parameter).
In the end, I should use the getSubcatTree(id) to get a products collection and then pass this to the getManuCollection(collection) to retrieve the same products collection's brands.
Of course those collections should work exactly like a normal Magento products/attribute collection.