diff --git a/controllers/front/SitemapController.php b/controllers/front/SitemapController.php index aaa72b560..b064575cd 100644 --- a/controllers/front/SitemapController.php +++ b/controllers/front/SitemapController.php @@ -47,10 +47,22 @@ class SitemapControllerCore extends FrontController $this->context->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1)); $this->context->smarty->assign('voucherAllowed', (int)CartRule::isFeatureActive()); - $blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); - $blocksupplier = Module::getInstanceByName('blocksupplier'); - $this->context->smarty->assign('display_manufacturer_link', (bool)$blockmanufacturer->active); - $this->context->smarty->assign('display_supplier_link', (bool)$blocksupplier->active); + if(Module::isInstalled('blockmanufacturer')) + { + $blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); + $this->context->smarty->assign('display_manufacturer_link', (bool)$blockmanufacturer->active); + } + else + $this->context->smarty->assign('display_manufacturer_link', 0); + + if(Module::isInstalled('blocksupplier')) + { + $blocksupplier = Module::getInstanceByName('blocksupplier'); + $this->context->smarty->assign('display_supplier_link', (bool)$blocksupplier->active); + } + else + $this->context->smarty->assign('display_supplier_link', 0); + $this->context->smarty->assign('PS_DISPLAY_SUPPLIERS', Configuration::get('PS_DISPLAY_SUPPLIERS')); $this->context->smarty->assign('display_store', Configuration::get('PS_STORES_DISPLAY_SITEMAP'));