fix: resolve invalid price display on product page for catalog rule base price

This commit is contained in:
Amit sharma
2026-06-03 19:38:26 +05:30
parent 2ec79257f1
commit 65cd0ff1ed
2 changed files with 3 additions and 3 deletions

View File

@@ -1833,7 +1833,7 @@ class CartCore extends ObjectModel
$this->id,
[],
0,
isset($product['id_hotel_cart_booking']) ? $product['id_hotel_cart_booking'] : null,
null,
null,
(int)$product['id_product'],
null,

View File

@@ -367,12 +367,12 @@ class SpecificPriceCore extends ObjectModel
`id_shop` '.self::formatIntInQuery(0, $id_shop).' AND
`id_currency` '.self::formatIntInQuery(0, $id_currency).' AND
`id_country` '.self::formatIntInQuery(0, $id_country).
' AND `id_htl_cart_booking`='.(int)$id_htl_cart_booking.' '.
' AND `id_htl_cart_booking` '.self::formatIntInQuery(0, $id_htl_cart_booking).' '.
(Group::isFeatureActive() ? ' AND `id_group` '.self::formatIntInQuery(0, $id_group) : '').' '.$query_extra.'
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, `score` DESC, `to` DESC, `from` DESC';
$query .= ' ORDER BY `id_htl_cart_booking` DESC, `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC, `to` DESC, `from` DESC';
SpecificPrice::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query);
}