Prestashop 显示所有类别和子类别,如aliExpress

Prestashop 显示所有类别和子类别,如aliExpress,prestashop,prestashop-1.6,Prestashop,Prestashop 1.6,我想显示所有类别和子类别,如AliExpress。我试图创建新模块,但我不知道如何从category表中获取所有数据。谁来帮帮我! 这是我的显示器控制器 $allCategories = Category::getNestedCategories(null, $this->context->language->id); $this->context->smarty->assign( 'allCategories' , $allCategories ); $t

我想显示所有类别和子类别,如AliExpress。我试图创建新模块,但我不知道如何从category表中获取所有数据。谁来帮帮我!

这是我的显示器控制器

$allCategories = Category::getNestedCategories(null, $this->context->language->id);
$this->context->smarty->assign( 'allCategories' , $allCategories );
$this->setTemplate('display.tpl');

但是只获取根目录和主目录

我应该可以工作,添加
Tools::p($allCategories)在代码中查看/调试类别树是否确保所有类别都处于活动状态,并且您的用户具有查看该类别的正确权限?我可以在何处添加工具::p($allCategories)@Sergii P?@第一行后的第一个编程者。Tools::p()=var_dump()刚刚进行了样式化,我建议您调试代码。我只想在Florian Lemaitre的商店中搜索活动类别