From 3638cdc3c9bb97ae0164f019308cce217bdd2cb1 Mon Sep 17 00:00:00 2001 From: bMancone Date: Tue, 18 Oct 2011 09:46:13 +0000 Subject: [PATCH] // Attribute: fixed checkAttributeQty() git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9410 b9a71923-0436-4b27-9f14-aed3839534dd --- 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);