diff --git a/classes/Product.php b/classes/Product.php index 84d36d0c2..862dd457d 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -3538,20 +3538,6 @@ class ProductCore extends ObjectModel return $price; } - public static function getPriceWithoutReductStatic($id_product, $notax = false, $id_product_attribute = false, $decimals = 6, $with_auto_add_services = 0) - { - $price = Product::getPriceStatic((int)$id_product, !$notax, $id_product_attribute, $decimals, null, false, false); - if ($with_auto_add_services) { - if ($services = RoomTypeServiceProduct::getAutoAddServices((int) $id_product, null, null, Product::PRICE_ADDITION_TYPE_WITH_ROOM, !$notax)) { - foreach($services as $service) { - $price += $service['price']; - } - } - } - - return $price; - } - /** * Display price with right format and currency * diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 93d6faa63..537aa3412 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -1691,8 +1691,7 @@ class HotelBookingDetail extends ObjectModel } $prod_price = Product::getPriceStatic($value['id_product'], self::useTax()); - $productPriceWithoutReduction = Product::getPriceWithoutReductStatic($value['id_product'], !self::useTax()); - $productFeaturePriceWithoutAutoAdd = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($value['id_product'], $date_from, $date_to, self::useTax(), 0, 0, 0, 0, 0); + $productPriceWithoutReduction = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay($value['id_product'], $date_from, $date_to, self::useTax(), 0, 0, 0, 0, 1, 0); $cover_image_arr = Product::getCover($value['id_product']); if (!empty($cover_image_arr)) { $cover_img = $this->context->link->getImageLink($value['link_rewrite'], $value['id_product'].'-'.$cover_image_arr['id_image'], 'home_default'); @@ -1703,10 +1702,8 @@ class HotelBookingDetail extends ObjectModel $bookingData['rm_data'][$key]['feature'] = $product_feature; $bookingData['rm_data'][$key]['price'] = $prod_price; $bookingData['rm_data'][$key]['feature_price'] = $productFeaturePrice; - $bookingData['rm_data'][$key]['feature_price_withoout_auto_add'] = $productFeaturePriceWithoutAutoAdd; $bookingData['rm_data'][$key]['price_without_reduction'] = $productPriceWithoutReduction; - $bookingData['rm_data'][$key]['price_without_reduction_with_auto_add'] = $productPriceWithoutReduction + ($productFeaturePrice - $productFeaturePriceWithoutAutoAdd); - $bookingData['rm_data'][$key]['feature_price_diff'] = $bookingData['rm_data'][$key]['price_without_reduction_with_auto_add'] - $productFeaturePrice; + $bookingData['rm_data'][$key]['feature_price_diff'] = $productPriceWithoutReduction - $productFeaturePrice; $bookingData['rm_data'][$key]['room_left'] = count($bookingData['rm_data'][$key]['data']['available']); // create URL with the parameters from URL diff --git a/themes/hotel-reservation-theme/_partials/room_type_list.tpl b/themes/hotel-reservation-theme/_partials/room_type_list.tpl index 34beec0fa..f72075d89 100644 --- a/themes/hotel-reservation-theme/_partials/room_type_list.tpl +++ b/themes/hotel-reservation-theme/_partials/room_type_list.tpl @@ -59,7 +59,7 @@

{if $room_v['feature_price_diff'] >= 0} - {displayPrice price = $room_v['price_without_reduction_with_auto_add']|round:2|floatVal} + {displayPrice price = $room_v['price_without_reduction']|round:2|floatVal} {/if} {if $room_v['feature_price_diff']}