// notice id_shop
This commit is contained in:
1 parent
c10fb24e31
commit
e589a52a52
1 file changed
+5
-5
+5
-5
@@ -188,13 +188,17 @@ class ShopCore extends ObjectModel
|
||||
AND s.active = 1
|
||||
AND s.deleted = 0
|
||||
ORDER BY LENGTH(uri) DESC';
|
||||
|
||||
$id_shop = '';
|
||||
if ($results = Db::getInstance()->executeS($sql))
|
||||
foreach ($results as $row)
|
||||
{
|
||||
if (preg_match('#^'.preg_quote($row['uri'], '#').'#', $_SERVER['REQUEST_URI']))
|
||||
{
|
||||
$id_shop = $row['id_shop'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$id_shop)
|
||||
die('Shop not found ... redirect me please !');
|
||||
@@ -365,8 +369,6 @@ class ShopCore extends ObjectModel
|
||||
self::$shops[$row['id_group_shop']] = array(
|
||||
'id' => $row['id_group_shop'],
|
||||
'name' => $row['group_name'],
|
||||
'share_customer' => $row['share_customer'],
|
||||
'share_order' => $row['share_order'],
|
||||
'share_stock' => $row['share_stock'],
|
||||
'shops' => array(),
|
||||
);
|
||||
@@ -476,9 +478,6 @@ class ShopCore extends ObjectModel
|
||||
die('Wrong argument ($type) in Shop::getSharedShops() method');
|
||||
|
||||
Shop::cacheShops();
|
||||
foreach (self::$shops as $groupData)
|
||||
if (array_key_exists($shopID, $groupData['shops']) && $groupData[$type])
|
||||
return array_keys($groupData['shops']);
|
||||
return array($shopID);
|
||||
}
|
||||
|
||||
@@ -743,3 +742,4 @@ class ShopCore extends ObjectModel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user