// 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:
1 parent
71033714c8
commit
7c14a5c8e3
1 file changed
+1
-6
@@ -351,17 +351,12 @@ class StockAvailableCore extends ObjectModel
|
|||||||
if ($this->id_product_attribute == 0)
|
if ($this->id_product_attribute == 0)
|
||||||
return true;
|
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('
|
$total_quantity = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||||
SELECT SUM(quantity) as quantity
|
SELECT SUM(quantity) as quantity
|
||||||
FROM '._DB_PREFIX_.'stock_available
|
FROM '._DB_PREFIX_.'stock_available
|
||||||
WHERE id_product = '.(int)$this->id_product.'
|
WHERE id_product = '.(int)$this->id_product.'
|
||||||
AND id_product_attribute <> 0 '.
|
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);
|
$this->setQuantity($this->id_product, 0, $total_quantity, $this->id_shop);
|
||||||
|
|||||||
Reference in new issue
Block a user