// Fix default shop associations in helper shop #PSTEST-746

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13367 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-02-15 16:43:32 +00:00
parent 6da9e16e8e
commit b1a1d78533
2 changed files with 22 additions and 2 deletions
+20
View File
@@ -334,6 +334,26 @@ class HelperCore
foreach (Db::getInstance()->executeS($sql) as $row)
$assos[$row['id_'.$type]] = $row['id_'.$type];
}
else
{
switch (Context::shop())
{
case Shop::CONTEXT_SHOP :
$assos[$this->context->shop->id] = $this->context->shop->id;
break;
case Shop::CONTEXT_GROUP :
foreach (Shop::getShops(false, $this->context->shop->getGroupID(), true) as $id_shop)
$assos[$id_shop] = $id_shop;
break;
default :
foreach (Shop::getShops(false, null, true) as $id_shop)
$assos[$id_shop] = $id_shop;
break;
}
}
$tpl = $this->createTemplate('helpers/assoshop.tpl');
$tpl->assign(array(
'input' => array(