// Fix for quantities update

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17909 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-10-22 16:40:10 +00:00
parent 58dc350815
commit 9abc5d86a5
+4 -1
View File
@@ -484,7 +484,10 @@ class StockAvailableCore extends ObjectModel
$stock_available->id_product_attribute = (int)$id_product_attribute;
$stock_available->quantity = (int)$quantity;
$shop_group = new ShopGroup((int)Shop::getGroupFromShop((int)$id_shop));
if ($id_shop === null)
$shop_group = Shop::getContextShopGroup();
else
$shop_group = new ShopGroup((int)Shop::getGroupFromShop((int)$id_shop));
// if quantities are shared between shops of the group
if ($shop_group->share_stock)