在prestashop-1.6.1.5之后,一些代码修复后,家庭类别消失了。
<?php
class CategoryController extends CategoryControllerCore
{
public function canonicalRedirection($canonicalURL = '')
{
if (Tools::getValue('live_edit'))
return ;
if (!Validate::isLoadedObject($this->category) ||
!$this->category->inShop() || !$this->category->isAssociatedToShop() ||
$this->category->id == Configuration::get('PS_ROOT_CATEGORY'))
{
$this->redirect_after = '404';
$this->redirect();
}
if (!Tools::getValue('noredirect') &&
Validate::isLoadedObject($this->category))
FrontController::canonicalRedirection(
$this->context->link->getCategoryLink($this->category));
}
}
?>