From 1642ebb68a654e3a3a8ae151d36eee8d43a4071d Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Wed, 9 May 2012 13:15:37 +0000 Subject: [PATCH] [-] BO : fix bug #PSCFV-2237 - Broken SQL Request in Product->getAccessories() --- classes/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Product.php b/classes/Product.php index fb763ab39..fba15ec05 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2911,7 +2911,7 @@ class ProductCore extends ObjectModel AND tr.`id_state` = 0) LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = tr.`id_tax`) '.Product::sqlStock('p', 0).' - AND `id_product_1` = '.(int)$this->id. + WHERE `id_product_1` = '.(int)$this->id. ($active ? ' AND product_shop.`active` = 1' : ''); if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) return false;