From acc053e0c8c7b581f1572bf155f0d716d7451283 Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Thu, 9 Mar 2023 17:26:38 +0530 Subject: [PATCH] fix specific price selection base on priority --- classes/SpecificPrice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/SpecificPrice.php b/classes/SpecificPrice.php index 139b392ab..e5cf02d71 100644 --- a/classes/SpecificPrice.php +++ b/classes/SpecificPrice.php @@ -359,7 +359,7 @@ class SpecificPriceCore extends ObjectModel AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION') || !$id_cart || !$real_quantity) ? (int)$quantity : max(1, (int)$real_quantity); - $query .= ' ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC, `to` DESC, `from` DESC'; + $query .= ' ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC, `to` DESC, `from` DESC'; SpecificPrice::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); }