From 25bf92679f7496dfec78dff38ec5ddf9bd1c4a34 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Thu, 24 Sep 2026 18:10:01 +0530 Subject: [PATCH 01/18] Fixed: Prevent connecting rooms from different hotels by changing room ID Co-authored-by: Name --- .../template/controllers/products/configuration.tpl | 8 ++++---- controllers/admin/AdminProductsController.php | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/products/configuration.tpl b/admin-dev/themes/default/template/controllers/products/configuration.tpl index 4d88277f5..62fd6c906 100644 --- a/admin-dev/themes/default/template/controllers/products/configuration.tpl +++ b/admin-dev/themes/default/template/controllers/products/configuration.tpl @@ -2005,7 +2005,7 @@ $('#connected_room_title').html(''); } } else { - alert(response.message); + showErrorMessage(response.message); } } }); @@ -2016,7 +2016,7 @@ var connectedRoomId = $row.find('.connect-room').val(); if (!connectedRoomId) { - alert(selectRoomText); + showErrorMessage(selectRoomText); return; } $.ajax({ @@ -2043,7 +2043,7 @@ $icon.text(response.connected_count); } } else { - alert(response.message); + showErrorMessage(response.message); } }, complete: function() { @@ -2132,7 +2132,7 @@ $icon.text(response.connected_count); } } else { - alert(response.message); + showErrorMessage(response.message); } } }); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index bd8a07335..f3d68dad1 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -5715,6 +5715,19 @@ class AdminProductsControllerCore extends AdminController $idHotel = (int) $objRoom->id_hotel; if ($mode === 'add') { + if (!Validate::isLoadedObject($objRoom)) { + die(json_encode(['success' => false, 'message' => $this->l('Invalid room selected.')])); + } + + $objConnectedRoom = new HotelRoomInformation($connectedRoomId); + if ( + $connectedRoomId === $roomId + || !Validate::isLoadedObject($objConnectedRoom) + || (int) $objConnectedRoom->id_hotel !== $idHotel + ) { + die(json_encode(['success' => false, 'message' => $this->l('Invalid room selected for connection.')])); + } + $connection = new HotelConnectedRoom(); $connection->id_room = $roomId; $connection->id_room_connected = $connectedRoomId; From 1ac0472171eff64baa80a17df385876d8bd0e255 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Fri, 25 Sep 2026 15:58:25 +0530 Subject: [PATCH 02/18] Fixed: Resolve Fatal Error When Admin Views Guest Cart in the Back Office --- .../default/template/controllers/carts/helpers/view/view.tpl | 4 ++-- controllers/admin/AdminCartsController.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl index c22482496..c4cacfa00 100644 --- a/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl @@ -102,7 +102,7 @@ {dateFormat date=$room['date_from'] full=$is_full_date} - {dateFormat date=$room['date_to'] full=$is_full_date} - {if $stay['adults']}{$stay['adults']}{/if} {if $stay['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$stay['children']}}, {$stay['children']} {if $stay['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} + {if $room['adults']}{$room['adults']}{/if} {if $room['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$room['children']}}, {$room['children']} {if $room['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} {displayWtPriceWithCurrency price=$room['feature_price_tax_excl'] currency=$currency} @@ -131,7 +131,7 @@
{if isset($room['selected_services']) && $room['selected_services']} diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index f895ba5ed..1c806d35b 100644 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -270,12 +270,12 @@ class AdminCartsControllerCore extends AdminController if (!($cart = $this->loadObject(true))) { return; } + $this->context->cart = $cart; if ($this->tabAccess['kpi'] === 1) { $this->content .= $this->renderKpis(); } $customer = new Customer($cart->id_customer); $currency = new Currency($cart->id_currency); - $this->context->cart = $cart; $this->context->currency = $currency; $this->context->customer = $customer; $this->toolbar_title = sprintf($this->l('Cart #%06d'), $this->context->cart->id); From 7d6918d7ee81e20708fc04a96c85971f89b1d4e4 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 29 Sep 2026 11:07:04 +0530 Subject: [PATCH 03/18] Fixed: fatal error and zero-amount voucher generation on credit slip Co-authored-by: Name --- classes/pdf/HTMLTemplateOrderSlip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/pdf/HTMLTemplateOrderSlip.php b/classes/pdf/HTMLTemplateOrderSlip.php index c9856be17..f2a32ad35 100644 --- a/classes/pdf/HTMLTemplateOrderSlip.php +++ b/classes/pdf/HTMLTemplateOrderSlip.php @@ -121,7 +121,7 @@ class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice } } } else { - $this->order->products = null; + $this->order->products = array(); } unset($product); // remove reference From 739418f5a00e2f30c1a0c142e66d77497653c840 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 29 Sep 2026 16:15:51 +0530 Subject: [PATCH 04/18] Fixed: Ensure consistent customer total spent amount across pages Co-authored-by: Name --- .../default/template/controllers/carts/helpers/view/view.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl index c22482496..b62e7de80 100644 --- a/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl @@ -47,7 +47,7 @@
-

{displayWtPriceWithCurrency price=Tools::convertPrice($customer_stats.total_orders|floatval, $currency) currency=$currency}

+

{displayWtPriceWithCurrency price=Tools::convertPrice($customer_stats.total_spent|floatval, $currency) currency=$currency}

{else} From aea379c1420ad198535f13574f2f647922b9d524 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 29 Sep 2026 16:38:48 +0530 Subject: [PATCH 05/18] Fixed: Allow restoring the original service product price in the cart Co-authored-by: Name --- controllers/admin/AdminCartsController.php | 30 ++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index f895ba5ed..940ba23b6 100644 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -1717,21 +1717,22 @@ class AdminCartsControllerCore extends AdminController $idCartBooking ))) { $originalPrice = Product::getPriceStatic($idServiceProduct, false); + $specificPriceInfo = SpecificPrice::getSpecificPrice( + (int)$idServiceProduct, + 0, + $objCart->id_currency, + 0, + 0, + 1, + 0, + 0, + $objCart->id, + 0, + $objHotelCartBookingData->id + ); // if price is different than the original service price then update the price if ($canEdit && $operator == 'up' && $originalPrice != $unitPrice) { - if ($specificPriceInfo = SpecificPrice::getSpecificPrice( - (int)$idServiceProduct, - 0, - $objCart->id_currency, - 0, - 0, - 1, - 0, - 0, - $objCart->id, - 0, - $objHotelCartBookingData->id - )) { + if ($specificPriceInfo) { $objSpecificPrice = new SpecificPrice($specificPriceInfo['id_specific_price']); } else { $objSpecificPrice = new SpecificPrice(); @@ -1755,6 +1756,9 @@ class AdminCartsControllerCore extends AdminController $objSpecificPrice->to = '0000-00-00 00:00:00'; $result &= $objSpecificPrice->save(); + } elseif ($canEdit && $operator == 'up' && $specificPriceInfo) { + $objSpecificPrice = new SpecificPrice($specificPriceInfo['id_specific_price']); + $result &= $objSpecificPrice->delete(); } } } From 126eac42381eb6cb27b49a774664fe3af1bb8635 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 29 Sep 2026 17:20:00 +0530 Subject: [PATCH 06/18] Fixed: update const --- classes/Cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Cart.php b/classes/Cart.php index 76cd45ce9..ff6fc2ed5 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -4061,7 +4061,7 @@ class CartCore extends ObjectModel ) { if ($serviceProducts = $objServiceProductCartDetail->getServiceProductsInCart( $this->id, - [Product::SELLING_PREFERENCE_HOTEL_STANDALONE, Product::SELLING_PREFERENCE_WITH_HOTEL_AND_WITH_ROOM_TYPE], + [Product::SELLING_PREFERENCE_WITH_HOTEL, Product::SELLING_PREFERENCE_WITH_HOTEL_AND_WITH_ROOM_TYPE], null, 0, null, From bf3ef61ba37367cc020e6203fe68bbb3f06bca0c Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 29 Sep 2026 17:27:17 +0530 Subject: [PATCH 07/18] Fixed: Handle deleted service products during checkout Co-authored-by: Name --- .../classes/ServiceProductCartDetail.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php b/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php index b132f797e..67871f56e 100644 --- a/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php +++ b/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php @@ -232,6 +232,9 @@ class ServiceProductCartDetail extends ObjectModel $context = Context::getContext(); foreach ($serviceProducts as $product) { $objProduct = new Product($product['id_product'], false, $language->id); + if (!Validate::isLoadedObject($objProduct)) { + continue; + } if (!$objProduct->booking_product) { $quantity = $product['quantity'] ? (int) $product['quantity'] : 1; From 599012a6a7cd56d29c0476cf47425acf0c8eb379 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Wed, 30 Sep 2026 10:27:34 +0530 Subject: [PATCH 08/18] Fixed: text issue in GRC option --- controllers/admin/AdminGuestRegistrationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminGuestRegistrationController.php b/controllers/admin/AdminGuestRegistrationController.php index e7347a620..4963de379 100644 --- a/controllers/admin/AdminGuestRegistrationController.php +++ b/controllers/admin/AdminGuestRegistrationController.php @@ -62,7 +62,7 @@ class AdminGuestRegistrationControllerCore extends AdminController $fieldSelected = $allSelected || in_array($fieldId, $sectionFields); $fieldNodes[] = array( 'value' => $fieldId, - 'name' => $fieldName, + 'name' => html_entity_decode($fieldName, ENT_QUOTES, 'UTF-8'), 'input_name' => 'grc_field_'.$sectionId, 'selected' => $fieldSelected, ); @@ -70,7 +70,7 @@ class AdminGuestRegistrationControllerCore extends AdminController $fieldsSelected = $allSelected || !empty(array_filter($fieldNodes, function ($n) { return $n['selected']; })); $nodes[] = array( 'value' => $sectionId, - 'name' => $section['name'], + 'name' => html_entity_decode($section['name'], ENT_QUOTES, 'UTF-8'), 'input_name' => 'grc_section', 'selected' => $fieldsSelected, 'children' => $fieldNodes, From 6fe78df37258e5b461c1e900c25e37e8baf86a55 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Wed, 30 Sep 2026 10:59:07 +0530 Subject: [PATCH 09/18] Fixed: Unable to unselect property type after disabling it --- .../classes/HotelPropertyType.php | 2 +- .../controllers/admin/AdminAddHotelController.php | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/hotelreservationsystem/classes/HotelPropertyType.php b/modules/hotelreservationsystem/classes/HotelPropertyType.php index cbe87d79b..6dee4e0a1 100644 --- a/modules/hotelreservationsystem/classes/HotelPropertyType.php +++ b/modules/hotelreservationsystem/classes/HotelPropertyType.php @@ -68,7 +68,7 @@ class HotelPropertyType extends ObjectModel $cacheKey = 'HotelPropertyType::getPropertyTypes'.$idLang.'_'.(int) $active; if (!Cache::isStored($cacheKey)) { - $sql = 'SELECT hpt.`id_htl_property_type` AS `id_property_type`, hptl.`name` + $sql = 'SELECT hpt.`id_htl_property_type` AS `id_property_type`, hpt.`active`, hptl.`name` FROM `'._DB_PREFIX_.'htl_property_type` hpt LEFT JOIN `'._DB_PREFIX_.'htl_property_type_lang` hptl ON (hpt.`id_htl_property_type` = hptl.`id_htl_property_type` diff --git a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php index 7dd1b3c52..d9ed1c4b4 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php @@ -229,12 +229,21 @@ class AdminAddHotelController extends ModuleAdminController $smartyVars['PS_MAX_CHECKOUT_OFFSET'] = (int) Configuration::get('PS_MAX_CHECKOUT_OFFSET'); $smartyVars['PS_MIN_BOOKING_OFFSET'] = (int) Configuration::get('PS_MIN_BOOKING_OFFSET'); $smartyVars['WK_ORDER_REFUND_ALLOWED'] = Configuration::get('WK_ORDER_REFUND_ALLOWED'); - $hotelPropertyTypes = HotelPropertyType::getPropertyTypes($this->context->language->id); - $smartyVars['hotel_property_types_info'] = $hotelPropertyTypes; + $hotelPropertyTypes = HotelPropertyType::getPropertyTypes($this->context->language->id, false); $selectedHotelPropertyType = Tools::getValue('id_property_type'); if (!$selectedHotelPropertyType && isset($hotelBranchInfo)) { $selectedHotelPropertyType = $hotelBranchInfo->id_property_type; } + // Remove inactive property types from the list. While editing a hotel, keep the currently assigned one even if it is disabled + foreach ($hotelPropertyTypes as $key => $propertyType) { + if (!$propertyType['active'] + && (!isset($idHotel) || (int) $propertyType['id_property_type'] != (int) $selectedHotelPropertyType) + ) { + unset($hotelPropertyTypes[$key]); + } + } + $hotelPropertyTypes = array_values($hotelPropertyTypes); + $smartyVars['hotel_property_types_info'] = $hotelPropertyTypes; $smartyVars['selected_hotel_property_type'] = (int) $selectedHotelPropertyType; $smartyVars['tourism_tax_collection_type'] = (int) $this->object->tourism_tax_collection_type; $smartyVars['use_tourism_tax'] = (int) Configuration::get('QLO_USE_TOURISM_TAX'); From 11b9c978a77f2eb7a35b001532f37fae0cd92c46 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Thu, 1 Oct 2026 18:42:35 +0530 Subject: [PATCH 10/18] Fixed: Match Nationality Field Shape With Other Fields Co-authored-by: Name --- .../js/autoload/15-jquery.uniform-modified.js | 2 +- themes/hotel-reservation-theme/js/tools/statesManagement.js | 2 +- themes/hotel-reservation-theme/order-opc-new-account.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js b/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js index ddcaeab96..2f616c9e2 100644 --- a/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js +++ b/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js @@ -1073,7 +1073,7 @@ Enjoy! if (typeof isMobile != 'undefined' && !isMobile){ $(window).load(function () { - $("select.form-control,input[type='checkbox']:not(.comparator), input[type='radio'],input#id_carrier2, input[type='file']").uniform(); + $("select.form-control,input[type='checkbox']:not(.comparator), input[type='radio'],input#id_carrier2, input[type='file']").not('.not_uniform').uniform(); }); // refresh uniform selects on document width change diff --git a/themes/hotel-reservation-theme/js/tools/statesManagement.js b/themes/hotel-reservation-theme/js/tools/statesManagement.js index a38bb793f..34cfbb8eb 100644 --- a/themes/hotel-reservation-theme/js/tools/statesManagement.js +++ b/themes/hotel-reservation-theme/js/tools/statesManagement.js @@ -78,7 +78,7 @@ function bindCheckbox() function bindUniform() { if (!!$.prototype.uniform) - $("select.form-control,input[type='radio'],input[type='checkbox']").uniform(); + $("select.form-control,input[type='radio'],input[type='checkbox']").not('.not_uniform').uniform(); } function bindZipcode() diff --git a/themes/hotel-reservation-theme/order-opc-new-account.tpl b/themes/hotel-reservation-theme/order-opc-new-account.tpl index 977c9be33..ec12ecd06 100644 --- a/themes/hotel-reservation-theme/order-opc-new-account.tpl +++ b/themes/hotel-reservation-theme/order-opc-new-account.tpl @@ -120,7 +120,7 @@
- {foreach from=$nationality_countries item=c} From ae31cf0aba5fbe66acd178ff3eecdae3aae687f7 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Thu, 1 Oct 2026 18:59:41 +0530 Subject: [PATCH 11/18] Fixed: Resolve Text Issue Co-authored-by: Name --- .../default/template/controllers/products/configuration.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/products/configuration.tpl b/admin-dev/themes/default/template/controllers/products/configuration.tpl index 5e9a836e7..1bd4a20f2 100644 --- a/admin-dev/themes/default/template/controllers/products/configuration.tpl +++ b/admin-dev/themes/default/template/controllers/products/configuration.tpl @@ -1606,7 +1606,7 @@ $('#deactiveDatesModal').attr('data-room-row-index', roomRowIndex); $('#deactiveDatesModal').attr('data-id-room', idRoom); if ($.trim(roomNum) != '') { - roomNum = '( '+'{l s='%s No' sprintf=$htl_room_type['selling_object_plural_name']}'+' '+roomNum+')'; + roomNum = '( '+'{l s='%s No' sprintf=$htl_room_type['selling_object_name']}'+' '+roomNum+')'; } $('#deactiveDatesModal .disable_dates_room_num').html(roomNum); From db6bb152cc223ff169edd069a01304489cc1690c Mon Sep 17 00:00:00 2001 From: amit sharma Date: Thu, 1 Oct 2026 19:08:32 +0530 Subject: [PATCH 12/18] Fixed: Prevent Hotel From Being Displayed Twice for Attached Service Products Co-authored-by: Name --- themes/hotel-reservation-theme/_partials/booking-form.tpl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/themes/hotel-reservation-theme/_partials/booking-form.tpl b/themes/hotel-reservation-theme/_partials/booking-form.tpl index c19447241..2c0ae4253 100644 --- a/themes/hotel-reservation-theme/_partials/booking-form.tpl +++ b/themes/hotel-reservation-theme/_partials/booking-form.tpl @@ -228,12 +228,6 @@
{l s='Buy Standalone.'}
- - {/if} {/block} @@ -241,7 +235,7 @@
{if isset($associated_hotels) && $associated_hotels}
- + id) }checked="checked"{/if}> - {l s='Sell With Standalone'} + {l s='Sell as a Standalone'}
diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index 6c7b2df80..7a2018188 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -619,7 +619,7 @@ abstract class PaymentModuleCore extends Module $serviceProducts = $objServiceProductCartDetail->getServiceProductsInCart( $order->id_cart, [], - null, + isset($product['id_hotel']) ? (int) $product['id_hotel'] : null, 0, null, $product['id_product'] From bd437bc4843410ac0f6833b985bc51d1830a2b5f Mon Sep 17 00:00:00 2001 From: amit sharma Date: Mon, 5 Oct 2026 15:45:42 +0530 Subject: [PATCH 14/18] Fixed: review changes Co-authored-by: Name --- .../template/helpers/tree/tree_node_folder_checkbox.tpl | 2 +- controllers/admin/AdminGuestRegistrationController.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin-dev/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl b/admin-dev/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl index ee107a6ab..87819b4d3 100644 --- a/admin-dev/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl +++ b/admin-dev/themes/default/template/helpers/tree/tree_node_folder_checkbox.tpl @@ -28,7 +28,7 @@ {/if} - + {if isset($node['badge'])} {$node['badge']['title']} diff --git a/controllers/admin/AdminGuestRegistrationController.php b/controllers/admin/AdminGuestRegistrationController.php index 4963de379..e7347a620 100644 --- a/controllers/admin/AdminGuestRegistrationController.php +++ b/controllers/admin/AdminGuestRegistrationController.php @@ -62,7 +62,7 @@ class AdminGuestRegistrationControllerCore extends AdminController $fieldSelected = $allSelected || in_array($fieldId, $sectionFields); $fieldNodes[] = array( 'value' => $fieldId, - 'name' => html_entity_decode($fieldName, ENT_QUOTES, 'UTF-8'), + 'name' => $fieldName, 'input_name' => 'grc_field_'.$sectionId, 'selected' => $fieldSelected, ); @@ -70,7 +70,7 @@ class AdminGuestRegistrationControllerCore extends AdminController $fieldsSelected = $allSelected || !empty(array_filter($fieldNodes, function ($n) { return $n['selected']; })); $nodes[] = array( 'value' => $sectionId, - 'name' => html_entity_decode($section['name'], ENT_QUOTES, 'UTF-8'), + 'name' => $section['name'], 'input_name' => 'grc_section', 'selected' => $fieldsSelected, 'children' => $fieldNodes, From 6919a16b563a96bc5fa6e350994b12f81629c0e6 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Mon, 5 Oct 2026 16:01:31 +0530 Subject: [PATCH 15/18] Fixed: review changes Co-authored-by: Name --- .../classes/HotelPropertyType.php | 2 +- .../admin/AdminAddHotelController.php | 13 +----- .../AdminHotelPropertyTypesController.php | 46 +++++++++++++++++++ 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/modules/hotelreservationsystem/classes/HotelPropertyType.php b/modules/hotelreservationsystem/classes/HotelPropertyType.php index 6dee4e0a1..cbe87d79b 100644 --- a/modules/hotelreservationsystem/classes/HotelPropertyType.php +++ b/modules/hotelreservationsystem/classes/HotelPropertyType.php @@ -68,7 +68,7 @@ class HotelPropertyType extends ObjectModel $cacheKey = 'HotelPropertyType::getPropertyTypes'.$idLang.'_'.(int) $active; if (!Cache::isStored($cacheKey)) { - $sql = 'SELECT hpt.`id_htl_property_type` AS `id_property_type`, hpt.`active`, hptl.`name` + $sql = 'SELECT hpt.`id_htl_property_type` AS `id_property_type`, hptl.`name` FROM `'._DB_PREFIX_.'htl_property_type` hpt LEFT JOIN `'._DB_PREFIX_.'htl_property_type_lang` hptl ON (hpt.`id_htl_property_type` = hptl.`id_htl_property_type` diff --git a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php index d9ed1c4b4..7dd1b3c52 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php @@ -229,21 +229,12 @@ class AdminAddHotelController extends ModuleAdminController $smartyVars['PS_MAX_CHECKOUT_OFFSET'] = (int) Configuration::get('PS_MAX_CHECKOUT_OFFSET'); $smartyVars['PS_MIN_BOOKING_OFFSET'] = (int) Configuration::get('PS_MIN_BOOKING_OFFSET'); $smartyVars['WK_ORDER_REFUND_ALLOWED'] = Configuration::get('WK_ORDER_REFUND_ALLOWED'); - $hotelPropertyTypes = HotelPropertyType::getPropertyTypes($this->context->language->id, false); + $hotelPropertyTypes = HotelPropertyType::getPropertyTypes($this->context->language->id); + $smartyVars['hotel_property_types_info'] = $hotelPropertyTypes; $selectedHotelPropertyType = Tools::getValue('id_property_type'); if (!$selectedHotelPropertyType && isset($hotelBranchInfo)) { $selectedHotelPropertyType = $hotelBranchInfo->id_property_type; } - // Remove inactive property types from the list. While editing a hotel, keep the currently assigned one even if it is disabled - foreach ($hotelPropertyTypes as $key => $propertyType) { - if (!$propertyType['active'] - && (!isset($idHotel) || (int) $propertyType['id_property_type'] != (int) $selectedHotelPropertyType) - ) { - unset($hotelPropertyTypes[$key]); - } - } - $hotelPropertyTypes = array_values($hotelPropertyTypes); - $smartyVars['hotel_property_types_info'] = $hotelPropertyTypes; $smartyVars['selected_hotel_property_type'] = (int) $selectedHotelPropertyType; $smartyVars['tourism_tax_collection_type'] = (int) $this->object->tourism_tax_collection_type; $smartyVars['use_tourism_tax'] = (int) Configuration::get('QLO_USE_TOURISM_TAX'); diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelPropertyTypesController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelPropertyTypesController.php index 43f5d249c..d3485a680 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelPropertyTypesController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelPropertyTypesController.php @@ -57,6 +57,17 @@ class AdminHotelPropertyTypesController extends ModuleAdminController $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array( + 'enableSelection' => array( + 'text' => $this->l('Enable selected'), + 'icon' => 'icon-power-off text-success', + ), + 'disableSelection' => array( + 'text' => $this->l('Disable selected'), + 'icon' => 'icon-power-off text-danger', + ), + 'divider' => array( + 'text' => 'divider', + ), 'delete' => array( 'text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), @@ -157,6 +168,13 @@ class AdminHotelPropertyTypesController extends ModuleAdminController $this->display = $idPropertyType ? 'edit' : 'add'; + if (!$this->errors && !Tools::getValue('active') && $idPropertyType) { + $objPropertyType = new HotelPropertyType((int) $idPropertyType); + if (Validate::isLoadedObject($objPropertyType) && $objPropertyType->active && $objPropertyType->isUsed()) { + $this->errors[] = $this->l('You cannot disable this property type because it is currently assigned to one or more properties.'); + } + } + if (!$this->errors) { parent::postProcess(); } @@ -165,6 +183,34 @@ class AdminHotelPropertyTypesController extends ModuleAdminController } } + public function processStatus() + { + $object = $this->loadObject(); + if (Validate::isLoadedObject($object) && $object->active && $object->isUsed()) { + $this->errors[] = $this->l('You cannot disable this property type because it is currently assigned to one or more properties.'); + + return false; + } + + return parent::processStatus(); + } + + protected function processBulkDisableSelection() + { + if (is_array($this->boxes) && !empty($this->boxes)) { + foreach ($this->boxes as $idPropertyType) { + $object = new HotelPropertyType((int) $idPropertyType); + if (Validate::isLoadedObject($object) && $object->isUsed()) { + $this->errors[] = $this->l('You cannot disable this property type because it is currently assigned to one or more properties.'); + + return false; + } + } + } + + return parent::processBulkDisableSelection(); + } + public function processDelete() { $object = $this->loadObject(); From 4518e5b97d6d6c0ca1df42e2631c8b664f8e3320 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 6 Oct 2026 11:35:38 +0530 Subject: [PATCH 16/18] Fixed: Remove white stripes during image transition with slide animation Co-authored-by: Name --- .../hotelreservationsystem/views/css/qhrs_header_media.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hotelreservationsystem/views/css/qhrs_header_media.css b/modules/hotelreservationsystem/views/css/qhrs_header_media.css index 210a4d8d1..5645b2563 100644 --- a/modules/hotelreservationsystem/views/css/qhrs_header_media.css +++ b/modules/hotelreservationsystem/views/css/qhrs_header_media.css @@ -120,8 +120,8 @@ @keyframes wkZoomIn { from { opacity:0; transform:scale(0.88); } to { opacity:1; transform:scale(1); } } @keyframes wkBlurOut { from { opacity:1; filter:blur(0); } to { opacity:0; filter:blur(10px); } } @keyframes wkBlurIn { from { opacity:0; filter:blur(10px); } to { opacity:1; filter:blur(0); } } -@keyframes wkSlideOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(-60px); } } -@keyframes wkSlideIn { from { opacity:0; transform:translateX(60px); } to { opacity:1; transform:translateX(0); } } +@keyframes wkSlideOut { from { transform:translateX(0); } to { transform:translateX(-100%); } } +@keyframes wkSlideIn { from { transform:translateX(100%); } to { transform:translateX(0); } } /* Description slide animation on slide change */ .js-header-description { From fb132c129c41463b767ee7cc58dc9016990727b0 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 6 Oct 2026 11:54:42 +0530 Subject: [PATCH 17/18] Fixed: review changes Co-authored-by: Name --- .../js/autoload/15-jquery.uniform-modified.js | 2 +- themes/hotel-reservation-theme/js/tools/statesManagement.js | 2 +- themes/hotel-reservation-theme/order-opc-new-account.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js b/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js index 2f616c9e2..ddcaeab96 100644 --- a/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js +++ b/themes/hotel-reservation-theme/js/autoload/15-jquery.uniform-modified.js @@ -1073,7 +1073,7 @@ Enjoy! if (typeof isMobile != 'undefined' && !isMobile){ $(window).load(function () { - $("select.form-control,input[type='checkbox']:not(.comparator), input[type='radio'],input#id_carrier2, input[type='file']").not('.not_uniform').uniform(); + $("select.form-control,input[type='checkbox']:not(.comparator), input[type='radio'],input#id_carrier2, input[type='file']").uniform(); }); // refresh uniform selects on document width change diff --git a/themes/hotel-reservation-theme/js/tools/statesManagement.js b/themes/hotel-reservation-theme/js/tools/statesManagement.js index 34cfbb8eb..a38bb793f 100644 --- a/themes/hotel-reservation-theme/js/tools/statesManagement.js +++ b/themes/hotel-reservation-theme/js/tools/statesManagement.js @@ -78,7 +78,7 @@ function bindCheckbox() function bindUniform() { if (!!$.prototype.uniform) - $("select.form-control,input[type='radio'],input[type='checkbox']").not('.not_uniform').uniform(); + $("select.form-control,input[type='radio'],input[type='checkbox']").uniform(); } function bindZipcode() diff --git a/themes/hotel-reservation-theme/order-opc-new-account.tpl b/themes/hotel-reservation-theme/order-opc-new-account.tpl index ec12ecd06..323534547 100644 --- a/themes/hotel-reservation-theme/order-opc-new-account.tpl +++ b/themes/hotel-reservation-theme/order-opc-new-account.tpl @@ -120,7 +120,7 @@
- {foreach from=$nationality_countries item=c} From 9e3fb0f4d04ddabd1424c5733734b89779b7fdf8 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 6 Oct 2026 12:53:29 +0530 Subject: [PATCH 18/18] Fixed: review changes --- controllers/admin/AdminCartsController.php | 57 ++++++++++++---------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 940ba23b6..eaa8633a3 100644 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -1731,35 +1731,38 @@ class AdminCartsControllerCore extends AdminController $objHotelCartBookingData->id ); // if price is different than the original service price then update the price - if ($canEdit && $operator == 'up' && $originalPrice != $unitPrice) { - if ($specificPriceInfo) { - $objSpecificPrice = new SpecificPrice($specificPriceInfo['id_specific_price']); - } else { - $objSpecificPrice = new SpecificPrice(); - } - $objSpecificPrice->id_shop = 0; - $objSpecificPrice->id_shop_group = 0; - $objSpecificPrice->id_cart = $objCart->id; - $objSpecificPrice->id_currency = $objCart->id_currency; - $objSpecificPrice->id_country = 0; - $objSpecificPrice->id_group = 0; - $objSpecificPrice->id_customer = 0; - $objSpecificPrice->id_product = $idServiceProduct; - $objSpecificPrice->id_product_attribute = 0; - $objSpecificPrice->price = $unitPrice; - $objSpecificPrice->from_quantity = 1; - $objSpecificPrice->reduction = 0; - $objSpecificPrice->id_htl_cart_booking = $objHotelCartBookingData->id; - $objSpecificPrice->reduction_type = 'amount'; - $objSpecificPrice->reduction_tax = 0; - $objSpecificPrice->from = '0000-00-00 00:00:00'; - $objSpecificPrice->to = '0000-00-00 00:00:00'; + if($canEdit && $operator == 'up'){ + if ($originalPrice != $unitPrice) { + if ($specificPriceInfo) { + $objSpecificPrice = new SpecificPrice($specificPriceInfo['id_specific_price']); + } else { + $objSpecificPrice = new SpecificPrice(); + } + $objSpecificPrice->id_shop = 0; + $objSpecificPrice->id_shop_group = 0; + $objSpecificPrice->id_cart = $objCart->id; + $objSpecificPrice->id_currency = $objCart->id_currency; + $objSpecificPrice->id_country = 0; + $objSpecificPrice->id_group = 0; + $objSpecificPrice->id_customer = 0; + $objSpecificPrice->id_product = $idServiceProduct; + $objSpecificPrice->id_product_attribute = 0; + $objSpecificPrice->price = $unitPrice; + $objSpecificPrice->from_quantity = 1; + $objSpecificPrice->reduction = 0; + $objSpecificPrice->id_htl_cart_booking = $objHotelCartBookingData->id; + $objSpecificPrice->reduction_type = 'amount'; + $objSpecificPrice->reduction_tax = 0; + $objSpecificPrice->from = '0000-00-00 00:00:00'; + $objSpecificPrice->to = '0000-00-00 00:00:00'; - $result &= $objSpecificPrice->save(); - } elseif ($canEdit && $operator == 'up' && $specificPriceInfo) { - $objSpecificPrice = new SpecificPrice($specificPriceInfo['id_specific_price']); - $result &= $objSpecificPrice->delete(); + $result &= $objSpecificPrice->save(); + } elseif ($specificPriceInfo) { + $objSpecificPrice = new SpecificPrice($specificPriceInfo['id_specific_price']); + $result &= $objSpecificPrice->delete(); + } } + } }