// Fix shop association in helper form for group shops #PSTEST-865
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13671 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -212,17 +212,27 @@ class HelperFormCore extends Helper
|
||||
switch (Shop::getContext())
|
||||
{
|
||||
case Shop::CONTEXT_SHOP :
|
||||
$assos[Shop::getContextShopID()] = Shop::getContextShopID();
|
||||
if ($type == 'shop')
|
||||
$assos[Shop::getContextShopID()] = Shop::getContextShopID();
|
||||
else
|
||||
$assos[Shop::getContextGroupShopID()] = Shop::getContextGroupShopID();
|
||||
break;
|
||||
|
||||
case Shop::CONTEXT_GROUP :
|
||||
foreach (Shop::getShops(false, Shop::getContextGroupShopID(), true) as $id_shop)
|
||||
$assos[$id_shop] = $id_shop;
|
||||
if ($type == 'shop')
|
||||
foreach (Shop::getShops(false, Shop::getContextGroupShopID(), true) as $id_shop)
|
||||
$assos[$id_shop] = $id_shop;
|
||||
else
|
||||
$assos[Shop::getContextGroupShopID()] = Shop::getContextGroupShopID();
|
||||
break;
|
||||
|
||||
default :
|
||||
foreach (Shop::getShops(false, null, true) as $id_shop)
|
||||
$assos[$id_shop] = $id_shop;
|
||||
if ($type == 'shop')
|
||||
foreach (Shop::getShops(false, null, true) as $id_shop)
|
||||
$assos[$id_shop] = $id_shop;
|
||||
else
|
||||
foreach (Shop::getTree() as $group_shop)
|
||||
$assos[$group_shop['id']] = $group_shop['id'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user