I want to show a combined list view of several categories on one page.
As I suppose, Magento cannot do this automatically.
So I tried to write some code that does this.
I load all child categories as objects in the view template (app/design/frontend/default/default/template/catalog/category/view.phtml )
To generate the HTML output I set the current category to the child category and call
Unfortunately, it shows only the products of the current category, but several times.
Does anyone know a solution?
Thanks in advance!
Here’s my code that I added in
// get all child categories as IDs
$childrenCategories = $_category->getAllChildren(TRUE);
// iterate over the child categories
foreach ($childrenCategories as $childCategoryID):
// get the child category as object
$childCategory = Mage::getModel('catalog/category')->load($childCategoryID);
// set the child category as current category
// generate the HTML output of the child category