// Remove unused var in StockAvailable

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12257 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-01-09 09:59:30 +00:00
parent 71033714c8
commit 7c14a5c8e3
+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);