diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php index ed48cce84..6984debfe 100644 --- a/controllers/front/CategoryController.php +++ b/controllers/front/CategoryController.php @@ -140,15 +140,15 @@ class CategoryControllerCore extends FrontController $id_category = Tools::getValue('id_category'); - $displayAllRooms = false; + $displayAllRoomsTypes = false; if (!($date_from = Tools::getValue('date_from'))) { $date_from = date('Y-m-d'); $date_to = date('Y-m-d', strtotime($date_from) + 86400); - $displayAllRooms = true; + $displayAllRoomsTypes = true; } if (!($date_to = Tools::getValue('date_to'))) { $date_to = date('Y-m-d', strtotime($date_from) + 86400); - $displayAllRooms = true; + $displayAllRoomsTypes = true; } // get occupancy of the search @@ -183,8 +183,8 @@ class CategoryControllerCore extends FrontController 'id_guest' => $id_guest, ); - if ($displayAllRooms) { - $bookingParams['room_info_detailed'] = 1; + if ($displayAllRoomsTypes) { + $bookingParams['display_all_room_types'] = 1; } $booking_data = $objBookingDetail->dataForFrontSearch($bookingParams); @@ -214,7 +214,7 @@ class CategoryControllerCore extends FrontController 'booking_data' => $booking_data, 'max_order_date' => $max_order_date, 'order_date_restrict' => $order_date_restrict, - 'display_all_rooms' => $displayAllRooms + 'display_all_room_types' => $displayAllRoomsTypes )); } else { Tools::redirect($this->context->link->getPageLink('pagenotfound')); @@ -269,16 +269,16 @@ class CategoryControllerCore extends FrontController $this->display_header = false; $this->display_footer = false; - $displayAllRooms = false; + $displayAllRoomsTypes = false; if (!($date_from = Tools::getValue('date_from'))) { $date_from = date('Y-m-d H:i:s'); $date_to = date('Y-m-d H:i:s', strtotime($date_from) + 86400); - $displayAllRooms = true; + $displayAllRoomsTypes = true; } if (!($date_to = Tools::getValue('date_to'))) { $date_to = date('Y-m-d H:i:s', strtotime($date_from) + 86400); - $displayAllRooms = true; + $displayAllRoomsTypes = true; } $htl_id_category = Tools::getValue('id_category'); @@ -335,8 +335,8 @@ class CategoryControllerCore extends FrontController 'id_guest' => $this->context->cookie->id_guest, ); - if ($displayAllRooms) { - $bookingParams['room_info_detailed'] = 1; + if ($displayAllRoomsTypes) { + $bookingParams['display_all_room_types'] = 1; } $booking_data = $objBookingDetail->dataForFrontSearch($bookingParams); diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 995144dd3..173092b3c 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -242,10 +242,6 @@ class HotelBookingDetail extends ObjectModel $params['full_detail'] = 0; } - if (!isset($params['room_info_detailed'])) { - $params['room_info_detailed'] = 0; - } - Hook::exec('actionBookingDataParamsModifier', array('params' => &$params)); return $params; @@ -1710,7 +1706,8 @@ class HotelBookingDetail extends ObjectModel unset($bookingData['rm_data'][$key]); continue; } - if (count($value['data']['available']) || $room_info_detailed) { + + if (count($value['data']['available']) || (isset($display_all_room_types) && $display_all_room_types)) { $prod_price = Product::getPriceStatic($value['id_product'], self::useTax()); $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']); diff --git a/themes/hotel-reservation-theme/_partials/occupancy_field.tpl b/themes/hotel-reservation-theme/_partials/occupancy_field.tpl index d589bde64..cf9ffb4ed 100644 --- a/themes/hotel-reservation-theme/_partials/occupancy_field.tpl +++ b/themes/hotel-reservation-theme/_partials/occupancy_field.tpl @@ -181,7 +181,7 @@ {block name='occupancy_field_actions'}
{$room_v['name']|escape:'htmlall':'UTF-8'}
{if !isset($restricted_country_mode) && !$PS_CATALOG_MODE && !$order_date_restrict} -$warning_num} style="display:none"{/if}> +
$warning_num} style="display:none"{/if}> {l s='Hurry!'} {$room_v['room_left']|escape:'htmlall':'UTF-8'} {l s='rooms left'}
{/if} @@ -70,7 +70,7 @@ {/block} {block name='room_type_list_room_price'}
{if $room_v['feature_price_diff'] >= 0}
@@ -97,7 +97,7 @@