prestashop主页类别显示404错误页面

时间:2016-06-14 12:36:20

标签: prestashop-1.6

在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));
    }
}
?>

0 个答案:

没有答案