From 91af5d6d36379bf4f9032c056a7987f65167568e Mon Sep 17 00:00:00 2001 From: bMancone Date: Tue, 18 Oct 2011 09:46:13 +0000 Subject: [PATCH] // Attribute: fixed checkAttributeQty() --- classes/Attribute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);