Skip to content

Commit

Permalink
fix: show categories deactivated
Browse files Browse the repository at this point in the history
  • Loading branch information
VivienCormier committed Oct 5, 2022
1 parent 1e2fec2 commit 00f8461
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions controllers/front/getcategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ protected function getTopLevelCategories($idLang, $active = true, $idShop = fals
' . Shop::addSqlAssociation('category', 'c') . '
WHERE `id_lang` = ' . (int) $idLang . '
AND c.`id_parent` = ' . (int) $idParent . '
' . ($active ? 'AND `active` = 1' : '') . '
GROUP BY c.`id_category`
ORDER BY category_shop.`position` ASC ' . ($limit > 0 ? ' LIMIT ' . (int) $start . ',' . (int) $limit : '');
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
Expand Down Expand Up @@ -96,12 +95,6 @@ protected function generateCategoriesMenu($categories, $is_children = 0)
$node['url'] = $link;
$node['type'] = 'category';
$node['page_identifier'] = 'category-' . $category['id_category'];

/* Whenever a category is not active we shouldnt display it to customer */
if ((bool) $category['active'] === false) {
continue;
}

$current = $this->page_name == 'category' && (int) Tools::getValue('id_category') == (int) $category['id_category'];
$node['current'] = $current;
$node['label'] = $category['name'];
Expand Down

0 comments on commit 00f8461

Please sign in to comment.