From 62d946ea681d0b2a2277dab3408f06af795c71ba Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 3 Oct 2013 18:41:06 +0200 Subject: [PATCH] [-] CORE : Fix bug #PSCFV-10179 Duplicate specific price records when updating a product --- classes/SpecificPriceRule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/SpecificPriceRule.php b/classes/SpecificPriceRule.php index 99b9f674d..294d770fc 100755 --- a/classes/SpecificPriceRule.php +++ b/classes/SpecificPriceRule.php @@ -183,7 +183,7 @@ class SpecificPriceRuleCore extends ObjectModel if ($conditions_group) { - $where .= ' AND ('; + $where .= ' AND (('; foreach ($conditions_group as $id_condition_group => $condition_group) { $fields = array( @@ -235,7 +235,7 @@ class SpecificPriceRuleCore extends ObjectModel $where = rtrim($where, ' AND ').') OR ('; } - $where = rtrim($where, 'OR ('); + $where = rtrim($where, 'OR (').')'; } if ($products && count($products)) $where .= ' AND p.id_product IN ('.implode(', ', array_map('intval', $products)).')';