[-] BO : fix the change of advanced stock management in the products on GroupShop context #PSCFV-5521

This commit is contained in:
rGaillard committed 2012-11-12 13:28:35 +00:00
1 parent 5c8eb0b20e
commit c026a07504
2 files changed
+24 -5

No files matched your search

@@ -4022,8 +4022,7 @@ class AdminProductsControllerCore extends AdminController
if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && Pack::isPack($product->id))
die (Tools::jsonEncode(array('error' => $this->l('Not possible if the product is a pack'))));
$product->advanced_stock_management = (int)Tools::getValue('value');
$product->save();
$product->setAdvancedStockManagement((int)Tools::getValue('value'));
if (StockAvailable::dependsOnStock($product->id) == 1 && (int)Tools::getValue('value') == 0)
StockAvailable::setProductDependsOnStock($product->id, 0);
break;