// Stock Available : bug fix

This commit is contained in:
dSevere
2011-11-22 12:57:09 +00:00
parent ce3dec3afc
commit c2840193b3
2 changed files with 2 additions and 2 deletions
@@ -3219,7 +3219,7 @@ class AdminProductsController extends AdminController
if (Tools::getValue('id_product_attribute') === false)
return Tools::jsonEncode(array('error' => 'Undefined id product attribute'));
// @todo : Product class should handle that
$stock_available = new StockAvailable(StockAvailable::getIdStockAvailableByProductId($product->id, (int)Tools::getValue('id_product_attribute')));
$stock_available = new StockAvailable(StockAvailable::getStockAvailableIdByProductId($product->id, (int)Tools::getValue('id_product_attribute')));
if (!$stock_available->id)
{
$stock_available->id_product = $product->id;