diff --git a/classes/Attribute.php b/classes/Attribute.php index b1c6ddf47..01651981d 100644 --- a/classes/Attribute.php +++ b/classes/Attribute.php @@ -165,9 +165,9 @@ class AttributeCore extends ObjectModel $shop = Context::getContext()->shop; $sql = 'SELECT quantity - FROM '._DB_PREFIX_.'stock + FROM '._DB_PREFIX_.'stock_available WHERE id_product_attribute = '.(int)$id_product_attribute - .$shop->addSqlRestriction(Shop::SHARE_STOCK); + .$shop->addSqlRestriction(); $result = (int)Db::getInstance()->getValue($sql); return ($result && $qty <= $result);