// Attribute: fixed checkAttributeQty()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9410 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -165,9 +165,9 @@ class AttributeCore extends ObjectModel
|
|||||||
$shop = Context::getContext()->shop;
|
$shop = Context::getContext()->shop;
|
||||||
|
|
||||||
$sql = 'SELECT quantity
|
$sql = 'SELECT quantity
|
||||||
FROM '._DB_PREFIX_.'stock
|
FROM '._DB_PREFIX_.'stock_available
|
||||||
WHERE id_product_attribute = '.(int)$id_product_attribute
|
WHERE id_product_attribute = '.(int)$id_product_attribute
|
||||||
.$shop->addSqlRestriction(Shop::SHARE_STOCK);
|
.$shop->addSqlRestriction();
|
||||||
$result = (int)Db::getInstance()->getValue($sql);
|
$result = (int)Db::getInstance()->getValue($sql);
|
||||||
|
|
||||||
return ($result && $qty <= $result);
|
return ($result && $qty <= $result);
|
||||||
|
|||||||
Reference in New Issue
Block a user