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

This commit is contained in:
rMalie
2012-02-15 16:43:32 +00:00
parent 7895a7f533
commit 1b9dadf95d
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(