// Fix product stocks on multishop

This commit is contained in:
rGaillard
2012-05-18 14:32:29 +00:00
parent 6c6dc6b94b
commit f81f83ca53
5 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -1292,7 +1292,7 @@ class AdminControllerCore extends Controller
'multi_shop' => Shop::isFeatureActive(),
'shop_list' => Helper::renderShopList(),
'shop' => $this->context->shop,
'shop_group' => $this->context->shop->getGroup(),
'shop_group' => new ShopGroup((int)Shop::getContextShopGroupID()),
'tab' => $tab,
'current_parent_id' => (int)Tab::getCurrentParentId(),
'tabs' => $tabs,
+3 -3
View File
@@ -418,7 +418,7 @@ class StockAvailableCore extends ObjectModel
// if we are in shop_group context
if (Shop::getContext() == Shop::CONTEXT_GROUP)
{
$shop_group = $context->shop->getGroup();
$shop_group = new ShopGroup((int)Shop::getContextShopGroupID());
// if quantities are shared between shops of the group
if ($shop_group->share_stock)
@@ -562,7 +562,7 @@ class StockAvailableCore extends ObjectModel
$id_shop = $context->shop->id;
// if we are in $shop_group context
$shop_group = $context->shop->getGroup();
$shop_group = new ShopGroup((int)Shop::getContextShopGroupID());
// if quantities are shared between shops of the group
if ($shop_group->share_stock)
@@ -614,7 +614,7 @@ class StockAvailableCore extends ObjectModel
if (is_null($id_shop))
$id_shop = $context->shop->id;
$shop_group = $context->shop->getGroup();
$shop_group = new ShopGroup((int)Shop::getContextShopGroupID());
// if quantities are shared between shops of the group
if ($shop_group->share_stock)