diff --git a/blocktopmenu.php b/blocktopmenu.php index 2986742..a660220 100644 --- a/blocktopmenu.php +++ b/blocktopmenu.php @@ -601,7 +601,7 @@ protected function generateCategoriesMenu($categories, $is_children = 0) foreach ($categories as $key => $category) { - if ($category['level_depth'] > 1) + if ($category['level_depth'] >= 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); @@ -610,7 +610,7 @@ protected function generateCategoriesMenu($categories, $is_children = 0) $link = $this->context->link->getPageLink('index'); /* Whenever a category is not active we shouldnt display it to customer */ - if ((bool)$cat->active === false) { + if (empty($cat->active)) { break; }