// PSCFV-5569: remove warning if module "blocksuppliers" and "blockmanufacturer" is deleted

This commit is contained in:
PrestaEdit
2012-11-25 23:08:47 +01:00
parent f5d4fbccfd
commit 7ac2970aff
+16 -4
View File
@@ -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'));