[-] FO: Fix PSCFV-3114 bad quantity discount applied with specific price rules

This commit is contained in:
rGaillard
2012-07-13 10:12:25 +00:00
parent ae844b7fc5
commit c05dd55d47
+2 -2
View File
@@ -230,7 +230,7 @@ class SpecificPriceCore extends ObjectModel
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`) (`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
) )
AND id_cart IN (0, '.(int)$id_cart.') AND id_cart IN (0, '.(int)$id_cart.')
ORDER BY `id_specific_price_rule` ASC, `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC'); ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC');
} }
return self::$_specificPriceCache[$key]; return self::$_specificPriceCache[$key];
} }
@@ -291,7 +291,7 @@ class SpecificPriceCore extends ObjectModel
AND AND
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`) (`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
) )
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC
'); ');
$targeted_prices = array(); $targeted_prices = array();