// Remove unused var in StockAvailable

This commit is contained in:
rMalie
2012-01-09 09:59:30 +00:00
parent bbb7d03932
commit aa60051662
+1 -6
View File
@@ -351,17 +351,12 @@ class StockAvailableCore extends ObjectModel
if ($this->id_product_attribute == 0)
return true;
$id_stock_available = StockAvailable::getStockAvailableIdByProductId($this->id_product, 0, $this->id_shop);
$context = Context::getContext();
$total_quantity = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT SUM(quantity) as quantity
FROM '._DB_PREFIX_.'stock_available
WHERE id_product = '.(int)$this->id_product.'
AND id_product_attribute <> 0 '.
StockAvailable::addSqlShopRestriction(null, $this->id_shop).'
'
StockAvailable::addSqlShopRestriction(null, $this->id_shop)
);
$this->setQuantity($this->id_product, 0, $total_quantity, $this->id_shop);