[-] CORE : Fix bug #PSCFV-10179 Duplicate specific price records when updating a product

This commit is contained in:
gRoussac committed 2013-10-03 18:41:06 +02:00
1 parent 31f421153d
commit 62d946ea68
1 file changed
+2 -2
+2 -2
View File
@@ -183,7 +183,7 @@ class SpecificPriceRuleCore extends ObjectModel
if ($conditions_group) if ($conditions_group)
{ {
$where .= ' AND ('; $where .= ' AND ((';
foreach ($conditions_group as $id_condition_group => $condition_group) foreach ($conditions_group as $id_condition_group => $condition_group)
{ {
$fields = array( $fields = array(
@@ -235,7 +235,7 @@ class SpecificPriceRuleCore extends ObjectModel
$where = rtrim($where, ' AND ').') OR ('; $where = rtrim($where, ' AND ').') OR (';
} }
$where = rtrim($where, 'OR ('); $where = rtrim($where, 'OR (').')';
} }
if ($products && count($products)) if ($products && count($products))
$where .= ' AND p.id_product IN ('.implode(', ', array_map('intval', $products)).')'; $where .= ' AND p.id_product IN ('.implode(', ', array_map('intval', $products)).')';