Based on my research in other answers, I have tried this in "modules\ps_mainmenu\ps_mainmenu.php" in the function "generateCategoriesmenu" and it seams it is working but only for the Main Meny bar, not for the category tree:
foreach ($categories as $key => $category) {
$node = $this->makeNode([]);
if ($category['level_depth'] > 1) {
$cat = new Category($category['id_category']);
if ((int)$cat ->id_category == 12)
$link = "https://www.motorola.com";
else
$link = $cat->getLink();
// Check if customer is set and check access
if (Validate::isLoadedObject($this->context->customer) && !$cat->checkAccess($this->context->customer->id)) {
continue;
}
} else {
$link = $this->context->link->getPageLink('index');
}
Any ideas of how to make it work for the category tree?
.png.022b5452a8f28f552bc9430097a16da2.png)