From f1c62a2e1ccf9215b42aea892e2b0169e7a1a91d Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Fri, 20 Apr 2012 07:05:43 +0000 Subject: [PATCH] [-] MO : #PSTEST-1193 - Fix bad SQL query syntax --- modules/blocklayered/blocklayered.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php index b2814cdb7..021aab333 100644 --- a/modules/blocklayered/blocklayered.php +++ b/modules/blocklayered/blocklayered.php @@ -77,7 +77,7 @@ class BlockLayered extends Module $products_count = Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'product`'); if ($products_count < 20000) // Lock template filter creation if too many products - $this->rebuildLayeredCache(); + $this->rebuildLayeredCache(); self::installPriceIndexTable(); $this->installFriendlyUrlTable(); $this->installIndexableAttributeTable(); @@ -3951,9 +3951,9 @@ class BlockLayered extends Module LEFT JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = p.id_product) LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category) WHERE c.active = 1'. - (count($categories_ids) ? 'AND cp.id_category IN ('.implode(',', $categories_ids).')' : '').' + (count($categories_ids) ? ' AND cp.id_category IN ('.implode(',', $categories_ids).')' : '').' AND '.$alias.'.active = 1'. - (count($products_ids) ? 'AND p.id_product IN ('.implode(',', $products_ids).')' : '')); + (count($products_ids) ? ' AND p.id_product IN ('.implode(',', $products_ids).')' : '')); $attribute_groups_by_id = array(); while ($row = $db->nextRow($attribute_groups))