diff --git a/admin-dev/functions.php b/admin-dev/functions.php
index 87f0c27f7..f3faf94ea 100644
--- a/admin-dev/functions.php
+++ b/admin-dev/functions.php
@@ -418,10 +418,18 @@ function generateShopList()
foreach ($tree as $gID => $group_data)
{
$disabled = ($group_data['totalShops'] != count($group_data['shops'])) ? 'disabled="disabled"' : '';
- $html .= '';
- foreach ($group_data['shops'] as $sID => $shopData)
- if ($shopData['active'])
- $html .= '';
+ if ($context->controller->multishop_context & Shop::CONTEXT_GROUP)
+ $html .= '';
+ else
+ $html .= '';
}
$html .= '';
diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php
index e9e11f7ca..d23895b5c 100644
--- a/classes/shop/Shop.php
+++ b/classes/shop/Shop.php
@@ -689,16 +689,6 @@ class ShopCore extends ObjectModel
return self::$context_id_group_shop;
}
- /**
- * Get ID shop from context
- *
- * @return int
- */
- public static function getContextGroupID()
- {
- return Shop::getContext('group');
- }
-
/**
* Add an sql restriction for shops fields
*
diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php
index 6bb202e32..401861d3b 100755
--- a/controllers/admin/AdminShopController.php
+++ b/controllers/admin/AdminShopController.php
@@ -237,6 +237,9 @@ class AdminShopControllerCore extends AdminController
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
+ if (Shop::getContext() == Shop::CONTEXT_GROUP)
+ $this->_where .= ' AND a.id_group_shop = '.(int)Shop::getContextGroupShopID();
+
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
$shop_delete_list = array();