diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php index e6baef35c..ae8ea2cf0 100755 --- a/classes/controller/FrontController.php +++ b/classes/controller/FrontController.php @@ -1106,8 +1106,8 @@ class FrontControllerCore extends Controller $this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0)); $this->context->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1)); $this->context->smarty->assign('voucherAllowed', (int)Configuration::get('PS_VOUCHERS')); - $this->context->smarty->assign('display_manufacturer_link', (((int)$blockmanufacturer->id) ? true : false)); - $this->context->smarty->assign('display_supplier_link', (((int)$blocksupplier->id) ? true : false)); + $this->context->smarty->assign('display_manufacturer_link', (bool)$blockmanufacturer->active); + $this->context->smarty->assign('display_supplier_link', (bool)$blocksupplier->active); $this->context->smarty->assign('PS_DISPLAY_SUPPLIERS', Configuration::get('PS_DISPLAY_SUPPLIERS')); $this->context->smarty->assign('display_store', Configuration::get('PS_STORES_DISPLAY_SITEMAP')); $this->context->smarty->assign('conditions', Configuration::get('PS_CONDITIONS')); diff --git a/controllers/front/SitemapController.php b/controllers/front/SitemapController.php index df60789be..949e44f8f 100644 --- a/controllers/front/SitemapController.php +++ b/controllers/front/SitemapController.php @@ -50,8 +50,8 @@ class SitemapControllerCore extends FrontController $blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); $blocksupplier = Module::getInstanceByName('blocksupplier'); - $this->context->smarty->assign('display_manufacturer_link', (((int)$blockmanufacturer->id) ? true : false)); - $this->context->smarty->assign('display_supplier_link', (((int)$blocksupplier->id) ? true : false)); + $this->context->smarty->assign('display_manufacturer_link', (bool)$blockmanufacturer->active); + $this->context->smarty->assign('display_supplier_link', (bool)$blocksupplier->active); $this->context->smarty->assign('PS_DISPLAY_SUPPLIERS', Configuration::get('PS_DISPLAY_SUPPLIERS')); $this->context->smarty->assign('display_store', Configuration::get('PS_STORES_DISPLAY_SITEMAP'));