// Fix stores with multishop + hide blockstore if no store

This commit is contained in:
rMalie
2012-02-28 15:35:15 +00:00
parent 294821df62
commit 421b307c7d
3 changed files with 13 additions and 8 deletions
+7 -1
View File
@@ -64,7 +64,13 @@ class BlockStore extends Module
function hookRightColumn($params)
{
$this->smarty->assign('store_img', Configuration::get('BLOCKSTORE_IMG'));
return $this->display(__FILE__, 'blockstore.tpl');
$sql = 'SELECT COUNT(*)
FROM '._DB_PREFIX_.'store s'
.Shop::addSqlAssociation('store', 's');
$total = Db::getInstance()->getValue($sql);
if ($total > 0)
return $this->display(__FILE__, 'blockstore.tpl');
}
function hookHeader($params)