Где-то тут надо исправить?
private function getCategory($id_category, $depth = 0, $id_lang = false, $id_shop = false) {
$id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id;
$category = new Category((int)$id_category, (int)$id_lang);
if ($category->level_depth > 1)
$category_link = $category->getLink();
else
$category_link = $this->context->link->getPageLink('index');
if (is_null($category->id))
return;
$children = Category::getChildren((int)$id_category, (int)$id_lang, true, (int)$id_shop);