Catalog tree
Posted: 02 Sep 2016, 14:13
Hi there!
I have a catalog tree that i created from backend admin, I need to show the same tree in frontend but when i search all categories the hasChildren function always return false. This is part of my code
I'm using typo3 7.6.10, extbase and Aimeos 16.4.3
Thanks in advance
I have a catalog tree that i created from backend admin, I need to show the same tree in frontend but when i search all categories the hasChildren function always return false. This is part of my code
Code: Select all
$manager = \Aimeos\MShop\Factory::createManager( $context, 'catalog' );
$search = $manager->createSearch();
$categories = $manager->searchItems($search);
foreach ($categories as $category) {
if ( $category->hasChildren() ) {
// code stuff...
}
}
Thanks in advance