From 9fbe4885ee12aa417d6fb61697b8e5d60b0045c4 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Mon, 28 Sep 2026 18:19:25 +0530 Subject: [PATCH 01/17] Fixed: resolve room inventory not restored for No Show/Canceled bookings Co-authored-by: Name --- .../classes/HotelBookingDetail.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 623f58783..3641c28a8 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -766,7 +766,7 @@ class HotelBookingDetail extends ObjectModel $excludeRoomId = array(); $excludeRoomId['checked_out'] = 'SELECT `id_room` FROM `'._DB_PREFIX_.'htl_booking_detail` - WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND IF(`id_status` = '. self::STATUS_CHECKED_OUT.', + WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND IF(`id_status` = '. self::STATUS_CHECKED_OUT.', IF('.(int) $hourlyBooking.', 1, (DATE_FORMAT(`check_out`, "%Y-%m-%d") != DATE_FORMAT(\''.pSQL($dateFrom).'\', "%Y-%m-%d")) AND (`check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\')) AND ( (`date_from` <= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\') OR (`date_from` >= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.pSQL($dateTo).'\') OR @@ -1096,7 +1096,7 @@ class HotelBookingDetail extends ObjectModel FROM `'._DB_PREFIX_.'htl_booking_detail` AS bd INNER JOIN `'._DB_PREFIX_.'htl_room_information` AS rf ON (rf.`id` = bd.`id_room`) INNER JOIN `'._DB_PREFIX_.'htl_room_type` AS hrt ON (hrt.`id_product` = rf.`id_product`) - WHERE bd.`id_hotel`='.(int)$idHotel.' AND rf.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE .' AND bd.`is_back_order` = 0 AND bd.`id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND IF(bd.`id_status` = '. self::STATUS_CHECKED_OUT .', IF('.(int) $hourlyBooking.', 1, (DATE_FORMAT(`check_out`, "%Y-%m-%d") != DATE_FORMAT(\''.pSQL($dateFrom).'\', "%Y-%m-%d")) AND (`check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\')) AND ( + WHERE bd.`id_hotel`='.(int)$idHotel.' AND rf.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE .' AND bd.`is_back_order` = 0 AND bd.`id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND bd.`id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND IF(bd.`id_status` = '. self::STATUS_CHECKED_OUT .', IF('.(int) $hourlyBooking.', 1, (DATE_FORMAT(`check_out`, "%Y-%m-%d") != DATE_FORMAT(\''.pSQL($dateFrom).'\', "%Y-%m-%d")) AND (`check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\')) AND ( (bd.`date_from` <= \''.pSQL($dateFrom).'\' AND bd.`check_out` > \''.pSQL($dateFrom).'\' AND bd.`check_out` < \''.pSQL($dateTo).'\') OR (bd.`date_from` > \''.pSQL($dateFrom).'\' AND bd.`date_from` < \''.pSQL($dateTo).'\' AND bd.`check_out` >= \''.pSQL($dateTo).'\') OR (bd.`date_from` > \''.pSQL($dateFrom).'\' AND bd.`date_from` < \''.pSQL($dateTo).'\' AND bd.`check_out` > \''.pSQL($dateFrom).'\' AND bd.`check_out` < \''.pSQL($dateTo).'\') @@ -1429,7 +1429,7 @@ class HotelBookingDetail extends ObjectModel $selectBookedRoomSearch = 'SELECT `id`, `id_order`, `id_product`, `id_room`, `id_hotel`, `id_customer`, `booking_type`, `id_status` AS booking_status, `comment`, `room_num`, `date_from`, IF(`id_status` = '. self::STATUS_CHECKED_OUT.', `check_out`,`date_to`) AS `date_to`, `check_in`, `check_out`, `date_to` AS `booking_date_to`'; $joinBookedRoomSearch = ''; - $whereBookedRoomSearch = 'WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND IF(`id_status` = '. self::STATUS_CHECKED_OUT.', ( + $whereBookedRoomSearch = 'WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND IF(`id_status` = '. self::STATUS_CHECKED_OUT.', ( (`date_from` <= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\') OR (`date_from` >= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.pSQL($dateTo).'\') OR (`date_from` >= \''.pSQL($dateFrom).'\' AND `date_from` < \''.pSQL($dateTo).'\' AND `check_out` >= \''.pSQL($dateTo).'\') OR @@ -1502,7 +1502,7 @@ class HotelBookingDetail extends ObjectModel $sql = 'SELECT `id`, `id_product`, `id_order`, `id_cart`, `id_room`, `id_hotel`, `id_customer`, `check_out`, `check_in`, `id_status` FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `id_room` = '.(int)$id_room. - ' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND ((date_from <= \''.pSQL($date_from).'\' AND date_to > \''. + ' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND ((date_from <= \''.pSQL($date_from).'\' AND date_to > \''. pSQL($date_from).'\' AND date_to <= \''.pSQL($date_to).'\') OR (date_from > \''.pSQL($date_from). '\' AND date_to < \''.pSQL($date_to).'\') OR (date_from >= \''.pSQL($date_from).'\' AND date_from < \''. pSQL($date_to).'\' AND date_to >= \''.pSQL($date_to).'\') OR (date_from < \''.pSQL($date_from). @@ -1968,7 +1968,7 @@ class HotelBookingDetail extends ObjectModel FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `id_hotel` = '.(int)$hotel_id.' AND `id_product` = '.(int)$id_room_type.' AND `date_from` = \''.pSQL($date_from).'\' AND `date_to` = \''.pSQL($date_to).'\' - AND `id_room`!='.(int)$id_room.' AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `is_back_order` = 0'; + AND `id_room`!='.(int)$id_room.' AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND `is_back_order` = 0'; return Db::getInstance()->executeS($sql); } @@ -2733,7 +2733,7 @@ class HotelBookingDetail extends ObjectModel `date_to` != \''.pSQL($old_date_to).'\' AND `date_to` > \''.pSQL($new_date_from).'\', `check_out` != \''.pSQL($old_date_to).'\' AND `check_out` > \''.pSQL($new_date_from).'\' ) - AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `is_back_order`=0'; + AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND `is_back_order`=0'; return Db::getInstance()->executeS($sql); } From 229b156e3ba5a6a71a3d320b8dbf72dd8b64ffeb Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Thu, 1 Oct 2026 11:55:19 +0530 Subject: [PATCH 02/17] Fixed:Hide Roomtype restriction if roomtypes lessthan 2. --- .../default/template/controllers/cart_rules/actions.tpl | 2 +- .../default/template/controllers/cart_rules/conditions.tpl | 3 +++ controllers/admin/AdminCartRulesController.php | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl index d7da999e3..a6866f2a7 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl @@ -97,7 +97,7 @@

diff --git a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl index 8a41e9221..8f44de792 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl @@ -286,6 +286,8 @@ {/if} + {* keep the block visible when rules are already saved, so they are not hidden from the admin *} + {if $total_room_types > 1 || $product_rule_groups|@count}

diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index d4e0bbee8..576db0d24 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -831,6 +831,10 @@ class AdminCartRulesControllerCore extends AdminController $product_rule_groups = $this->getProductRuleGroupsDisplay($current_object); + // Room type restriction is useful only when there is more than one room type to choose from + $objHotelRoomType = new HotelRoomType(); + $total_room_types = count($objHotelRoomType->getAllRoomTypes()); + $attribute_groups = AttributeGroup::getAttributesGroups($this->context->language->id); $currencies = Currency::getCurrencies(false, true, true); $languages = Language::getLanguages(); @@ -901,6 +905,7 @@ class AdminCartRulesControllerCore extends AdminController 'cart_rules' => $cart_rules, 'product_rule_groups' => $product_rule_groups, 'product_rule_groups_counter' => count($product_rule_groups), + 'total_room_types' => $total_room_types, 'attribute_groups' => $attribute_groups, 'currentIndex' => self::$currentIndex, 'currentToken' => $this->token, From a638861c14dbcf5409f476f50c4fe16d011a93bb Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Mon, 5 Oct 2026 13:10:52 +0530 Subject: [PATCH 03/17] Fixed:hotel section is now visiable for one or no hotel --- .../controllers/cart_rules/actions.tpl | 2 +- .../controllers/cart_rules/conditions.tpl | 67 +++++++++---------- .../admin/AdminCartRulesController.php | 5 -- 3 files changed, 32 insertions(+), 42 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl index a6866f2a7..d7da999e3 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl @@ -97,7 +97,7 @@

diff --git a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl index 8f44de792..b4d80f043 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl @@ -220,39 +220,37 @@ {/if} - {if $hotels.unselected|@count + $hotels.selected|@count > 1} -

- -

-
-
- - - - - -
-

{l s='Unselected hotels'}

- - {l s='Add'} -
-

{l s='Selected hotels'}

- - {l s='Remove'} -
-
- {/if} +

+ +

+
+
+ + + + + +
+

{l s='Unselected hotels'}

+ + {l s='Add'} +
+

{l s='Selected hotels'}

+ + {l s='Remove'} +
+
{if $cart_rules.unselected|@count + $cart_rules.selected|@count > 0}

@@ -286,8 +284,6 @@ {/if} - {* keep the block visible when rules are already saved, so they are not hidden from the admin *} - {if $total_room_types > 1 || $product_rule_groups|@count}

diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index 576db0d24..d4e0bbee8 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -831,10 +831,6 @@ class AdminCartRulesControllerCore extends AdminController $product_rule_groups = $this->getProductRuleGroupsDisplay($current_object); - // Room type restriction is useful only when there is more than one room type to choose from - $objHotelRoomType = new HotelRoomType(); - $total_room_types = count($objHotelRoomType->getAllRoomTypes()); - $attribute_groups = AttributeGroup::getAttributesGroups($this->context->language->id); $currencies = Currency::getCurrencies(false, true, true); $languages = Language::getLanguages(); @@ -905,7 +901,6 @@ class AdminCartRulesControllerCore extends AdminController 'cart_rules' => $cart_rules, 'product_rule_groups' => $product_rule_groups, 'product_rule_groups_counter' => count($product_rule_groups), - 'total_room_types' => $total_room_types, 'attribute_groups' => $attribute_groups, 'currentIndex' => self::$currentIndex, 'currentToken' => $this->token, From 4f4cd0658282da370d5d19fb664422df01a5740c Mon Sep 17 00:00:00 2001 From: amit sharma Date: Fri, 9 Oct 2026 19:18:51 +0530 Subject: [PATCH 04/17] Fixed: 404 icon displayed on some module cards on the Module Catalog page Co-authored-by: Name --- classes/module/Module.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/classes/module/Module.php b/classes/module/Module.php index 69ea19b9a..b19b09d27 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -1663,15 +1663,16 @@ abstract class ModuleCore if (!in_array($modaddons->name, $modulesOnDisk)) { if (isset($modaddons->img)) { - if (!file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) { - if (!file_put_contents(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg', Tools::file_get_contents($modaddons->img))) { - copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg'); + $imgFile = md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg'; + if (!file_exists(_PS_TMP_IMG_DIR_.$imgFile)) { + $imgContent = Tools::file_get_contents($modaddons->img); + if ($imgContent) { + file_put_contents(_PS_TMP_IMG_DIR_.$imgFile, $imgContent); } } - if (file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) { - $item->image = '../img/tmp/'.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg'; - } + // Show 404 image without caching it, so the download is retried next time + $item->image = file_exists(_PS_TMP_IMG_DIR_.$imgFile) ? '../img/tmp/'.$imgFile : '../img/404.gif'; } } From 150a5a40ca16a08f819869fa24ffb2a07a151015 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Wed, 14 Oct 2026 17:39:06 +0530 Subject: [PATCH 05/17] Fixed: new thread created when name, phone, title or email differs --- controllers/front/ContactController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php index 4faa76dea..35399f6d5 100644 --- a/controllers/front/ContactController.php +++ b/controllers/front/ContactController.php @@ -101,6 +101,9 @@ class ContactControllerCore extends FrontController $id_order, $id_contact, ' AND a.`status` !='. CustomerThread::QLO_CUSTOMER_THREAD_STATUS_CLOSED + .' AND a.`user_name` = \''.pSQL($userName).'\'' + .' AND a.`phone` = \''.pSQL($phone).'\'' + .' AND a.`subject` = \''.pSQL($subject).'\'' ); } From 6c192e4faf82a3c000e97064b42f7ac741d9f039 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Thu, 15 Oct 2026 12:12:56 +0530 Subject: [PATCH 06/17] text changes --- .../default/template/controllers/cart_rules/conditions.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl index b4d80f043..dd2e4f3bc 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl @@ -223,7 +223,7 @@

From 91189094f7d42983c4f8a24d2b9f38cd6e1e7cfa Mon Sep 17 00:00:00 2001 From: amit sharma Date: Thu, 15 Oct 2026 13:34:01 +0530 Subject: [PATCH 07/17] Fixed: review changes --- .../classes/HotelBookingDetail.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 7ce514bda..dd5c68a76 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -766,7 +766,7 @@ class HotelBookingDetail extends ObjectModel $excludeRoomId = array(); $excludeRoomId['checked_out'] = 'SELECT `id_room` FROM `'._DB_PREFIX_.'htl_booking_detail` - WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND IF(`id_status` = '. self::STATUS_CHECKED_OUT.', + WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.HotelBookingDetail::STATUS_CANCELLED.', '.HotelBookingDetail::STATUS_NO_SHOW.') AND IF(`id_status` = '. HotelBookingDetail::STATUS_CHECKED_OUT.', IF('.(int) $hourlyBooking.', 1, (DATE_FORMAT(`check_out`, "%Y-%m-%d") != DATE_FORMAT(\''.pSQL($dateFrom).'\', "%Y-%m-%d")) AND (`check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\')) AND ( (`date_from` <= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\') OR (`date_from` >= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.pSQL($dateTo).'\') OR @@ -1096,7 +1096,7 @@ class HotelBookingDetail extends ObjectModel FROM `'._DB_PREFIX_.'htl_booking_detail` AS bd INNER JOIN `'._DB_PREFIX_.'htl_room_information` AS rf ON (rf.`id` = bd.`id_room`) INNER JOIN `'._DB_PREFIX_.'htl_room_type` AS hrt ON (hrt.`id_product` = rf.`id_product`) - WHERE bd.`id_hotel`='.(int)$idHotel.' AND rf.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE .' AND bd.`is_back_order` = 0 AND bd.`id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND bd.`id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND IF(bd.`id_status` = '. self::STATUS_CHECKED_OUT .', IF('.(int) $hourlyBooking.', 1, (DATE_FORMAT(`check_out`, "%Y-%m-%d") != DATE_FORMAT(\''.pSQL($dateFrom).'\', "%Y-%m-%d")) AND (`check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\')) AND ( + WHERE bd.`id_hotel`='.(int)$idHotel.' AND rf.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE .' AND bd.`is_back_order` = 0 AND bd.`id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND bd.`id_status` NOT IN ('.HotelBookingDetail::STATUS_CANCELLED.', '.HotelBookingDetail::STATUS_NO_SHOW.') AND IF(bd.`id_status` = '. HotelBookingDetail::STATUS_CHECKED_OUT .', IF('.(int) $hourlyBooking.', 1, (DATE_FORMAT(`check_out`, "%Y-%m-%d") != DATE_FORMAT(\''.pSQL($dateFrom).'\', "%Y-%m-%d")) AND (`check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\')) AND ( (bd.`date_from` <= \''.pSQL($dateFrom).'\' AND bd.`check_out` > \''.pSQL($dateFrom).'\' AND bd.`check_out` < \''.pSQL($dateTo).'\') OR (bd.`date_from` > \''.pSQL($dateFrom).'\' AND bd.`date_from` < \''.pSQL($dateTo).'\' AND bd.`check_out` >= \''.pSQL($dateTo).'\') OR (bd.`date_from` > \''.pSQL($dateFrom).'\' AND bd.`date_from` < \''.pSQL($dateTo).'\' AND bd.`check_out` > \''.pSQL($dateFrom).'\' AND bd.`check_out` < \''.pSQL($dateTo).'\') @@ -1429,7 +1429,7 @@ class HotelBookingDetail extends ObjectModel $selectBookedRoomSearch = 'SELECT `id`, `id_order`, `id_product`, `id_room`, `id_hotel`, `id_customer`, `booking_type`, `id_status` AS booking_status, `comment`, `room_num`, `date_from`, IF(`id_status` = '. self::STATUS_CHECKED_OUT.', `check_out`,`date_to`) AS `date_to`, `check_in`, `check_out`, `date_to` AS `booking_date_to`'; $joinBookedRoomSearch = ''; - $whereBookedRoomSearch = 'WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND IF(`id_status` = '. self::STATUS_CHECKED_OUT.', ( + $whereBookedRoomSearch = 'WHERE `id_hotel` = '.(int)$idHotel.' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.HotelBookingDetail::STATUS_CANCELLED.', '.HotelBookingDetail::STATUS_NO_SHOW.') AND IF(`id_status` = '. HotelBookingDetail::STATUS_CHECKED_OUT.', ( (`date_from` <= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.PSQL($dateTo).'\') OR (`date_from` >= \''.pSQL($dateFrom).'\' AND `check_out` > \''.pSQL($dateFrom).'\' AND `check_out` <= \''.pSQL($dateTo).'\') OR (`date_from` >= \''.pSQL($dateFrom).'\' AND `date_from` < \''.pSQL($dateTo).'\' AND `check_out` >= \''.pSQL($dateTo).'\') OR @@ -1502,7 +1502,7 @@ class HotelBookingDetail extends ObjectModel $sql = 'SELECT `id`, `id_product`, `id_order`, `id_cart`, `id_room`, `id_hotel`, `id_customer`, `check_out`, `check_in`, `id_status` FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `id_room` = '.(int)$id_room. - ' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND ((date_from <= \''.pSQL($date_from).'\' AND date_to > \''. + ' AND `is_back_order` = 0 AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.HotelBookingDetail::STATUS_CANCELLED.', '.HotelBookingDetail::STATUS_NO_SHOW.') AND ((date_from <= \''.pSQL($date_from).'\' AND date_to > \''. pSQL($date_from).'\' AND date_to <= \''.pSQL($date_to).'\') OR (date_from > \''.pSQL($date_from). '\' AND date_to < \''.pSQL($date_to).'\') OR (date_from >= \''.pSQL($date_from).'\' AND date_from < \''. pSQL($date_to).'\' AND date_to >= \''.pSQL($date_to).'\') OR (date_from < \''.pSQL($date_from). @@ -1968,7 +1968,7 @@ class HotelBookingDetail extends ObjectModel FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `id_hotel` = '.(int)$hotel_id.' AND `id_product` = '.(int)$id_room_type.' AND `date_from` = \''.pSQL($date_from).'\' AND `date_to` = \''.pSQL($date_to).'\' - AND `id_room`!='.(int)$id_room.' AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND `is_back_order` = 0'; + AND `id_room`!='.(int)$id_room.' AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.HotelBookingDetail::STATUS_CANCELLED.', '.HotelBookingDetail::STATUS_NO_SHOW.') AND `is_back_order` = 0'; return Db::getInstance()->executeS($sql); } @@ -2733,7 +2733,7 @@ class HotelBookingDetail extends ObjectModel `date_to` != \''.pSQL($old_date_to).'\' AND `date_to` > \''.pSQL($new_date_from).'\', `check_out` != \''.pSQL($old_date_to).'\' AND `check_out` > \''.pSQL($new_date_from).'\' ) - AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.self::STATUS_CANCELLED.', '.self::STATUS_NO_SHOW.') AND `is_back_order`=0'; + AND `id` NOT IN ('.OrderReturn::getRefundedBookingIdsSubquery().') AND `id_status` NOT IN ('.HotelBookingDetail::STATUS_CANCELLED.', '.HotelBookingDetail::STATUS_NO_SHOW.') AND `is_back_order`=0'; return Db::getInstance()->executeS($sql); } From 00146eef9bb0e0ca5a222e105281e66461dc785f Mon Sep 17 00:00:00 2001 From: shazar rahman Date: Thu, 15 Oct 2026 13:41:11 +0530 Subject: [PATCH 08/17] Fixed: Tax labels (incl./excl.) shown in front office even when taxes are disabled Co-authored-by: Name --- modules/blockcart/blockcart.tpl | 10 ++++---- .../cart-total-block.tpl | 24 +++++++++---------- .../modules/blockcart/blockcart.tpl | 10 ++++---- .../shopping-cart-detail.tpl | 12 +++++----- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index a4227cd3e..347cab3f9 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -273,7 +273,7 @@
{l s='Total Rooms Cost in cart' mod='blockcart'} - {if $display_tax_label} + {if $use_taxes && $display_tax_label} {if $priceDisplay == 1} {l s='(tax excl.)' mod='blockcart'} {else} @@ -292,7 +292,7 @@
{l s='Total Product Cost in cart' mod='blockcart'} - {if $display_tax_label} + {if $use_taxes && $display_tax_label} {if $priceDisplay == 1} {l s='(tax excl.)' mod='blockcart'} {else} @@ -331,7 +331,7 @@ {/if} --> + + Eigendommen + + + eigendommen + diff --git a/install-dev/langs/no/data/meta.xml b/install-dev/langs/no/data/meta.xml index 442acfa9e..37961d739 100644 --- a/install-dev/langs/no/data/meta.xml +++ b/install-dev/langs/no/data/meta.xml @@ -125,10 +125,10 @@ order-follow - Our Properties + Properties - our-properties + properties Order slip diff --git a/install-dev/langs/pl/data/meta.xml b/install-dev/langs/pl/data/meta.xml index 61c8f1c8c..cf6531280 100644 --- a/install-dev/langs/pl/data/meta.xml +++ b/install-dev/langs/pl/data/meta.xml @@ -125,10 +125,10 @@ sledzenie-zamowienia - Nasze nieruchomości + Nieruchomości - our-properties + nieruchomosci Pokwitowania diff --git a/install-dev/langs/pt/data/meta.xml b/install-dev/langs/pt/data/meta.xml index f46abbe2d..77805e795 100644 --- a/install-dev/langs/pt/data/meta.xml +++ b/install-dev/langs/pt/data/meta.xml @@ -125,10 +125,10 @@ acompanhar-encomenda - Nossas propriedades + Propriedades - our-properties + propriedades Nota de Encomenda diff --git a/install-dev/langs/qc/data/meta.xml b/install-dev/langs/qc/data/meta.xml index d83c56aa5..4754977ad 100644 --- a/install-dev/langs/qc/data/meta.xml +++ b/install-dev/langs/qc/data/meta.xml @@ -178,4 +178,10 @@ comparaison-produits --> + + Propriétés + + + proprietes + diff --git a/install-dev/langs/ro/data/meta.xml b/install-dev/langs/ro/data/meta.xml index 6b93eee1e..2ef3f3fd4 100644 --- a/install-dev/langs/ro/data/meta.xml +++ b/install-dev/langs/ro/data/meta.xml @@ -125,10 +125,10 @@ returnari - Proprietățile noastre + Proprietăți - our-properties + proprietati Bon de comandă diff --git a/install-dev/langs/ru/data/meta.xml b/install-dev/langs/ru/data/meta.xml index 908c81c4b..f650415ae 100644 --- a/install-dev/langs/ru/data/meta.xml +++ b/install-dev/langs/ru/data/meta.xml @@ -125,10 +125,10 @@ order-follow - Наши объекты + Объекты - our-properties + properties Бланк заказа diff --git a/install-dev/langs/si/data/meta.xml b/install-dev/langs/si/data/meta.xml index a6b3d6a23..0f90fd954 100644 --- a/install-dev/langs/si/data/meta.xml +++ b/install-dev/langs/si/data/meta.xml @@ -125,10 +125,10 @@ order-follow - Our Properties + Properties - our-properties + properties Credit slip diff --git a/install-dev/langs/sr/data/meta.xml b/install-dev/langs/sr/data/meta.xml index 7aff1d638..627c49699 100644 --- a/install-dev/langs/sr/data/meta.xml +++ b/install-dev/langs/sr/data/meta.xml @@ -119,10 +119,10 @@ my-account - Our Properties + Properties - our-properties + properties Order follow diff --git a/install-dev/langs/sv/data/meta.xml b/install-dev/langs/sv/data/meta.xml index ef818fd95..8dc2cd39d 100644 --- a/install-dev/langs/sv/data/meta.xml +++ b/install-dev/langs/sv/data/meta.xml @@ -125,10 +125,10 @@ order-follow - Our Properties + Properties - our-properties + properties Credit slip diff --git a/install-dev/langs/tw/data/meta.xml b/install-dev/langs/tw/data/meta.xml index a73b12ef7..d889dafd9 100644 --- a/install-dev/langs/tw/data/meta.xml +++ b/install-dev/langs/tw/data/meta.xml @@ -125,10 +125,10 @@ order-follow - 我們的物業 + 物業 - our-properties + properties 訂購單 diff --git a/install-dev/langs/vn/data/meta.xml b/install-dev/langs/vn/data/meta.xml index 1a84b1dc9..ba45c7365 100644 --- a/install-dev/langs/vn/data/meta.xml +++ b/install-dev/langs/vn/data/meta.xml @@ -125,10 +125,10 @@ order-follow - Các bất động sản của chúng tôi + Bất động sản - our-properties + properties Phiếu tín dụng diff --git a/install-dev/langs/zh/data/meta.xml b/install-dev/langs/zh/data/meta.xml index 2c6fe190c..f840044f0 100644 --- a/install-dev/langs/zh/data/meta.xml +++ b/install-dev/langs/zh/data/meta.xml @@ -125,10 +125,10 @@ order-follow - Our Properties + Properties - our-properties + properties Order slip diff --git a/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php b/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php index e4e86b593..ce34701ce 100644 --- a/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php +++ b/modules/blocknavigationmenu/classes/WkCustomNavigationLink.php @@ -193,7 +193,7 @@ class WkCustomNavigationLink extends ObjectModel 'link' => 'index', ), array( - 'name' => 'Our Properties', + 'name' => 'Properties', 'id_cms' => 0, 'show_at_navigation' => 1, 'show_at_footer' => 0, diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php index 25b8279bc..c4b03fb7c 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php @@ -156,7 +156,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'class' => 'fixed-width-xxl', ), 'WK_DISPLAY_PROPERTIES_LINK_IN_HEADER' => array( - 'title' => $this->l('Display Our Properties link in Header'), + 'title' => $this->l('Display Properties link in Header'), 'cast' => 'intval', 'type' => 'bool', 'default' => '0', @@ -170,7 +170,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'value' => 0, ), ), - 'hint' => $this->l('Display Our Properties link in header in the front office'), + 'hint' => $this->l('Display Properties link in header in the front office'), ), 'WK_DISPLAY_CONTACT_PAGE_HOTEL_LIST' => array( 'title' => $this->l('Display Contact Page Hotel List'), @@ -423,7 +423,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'hint' => $this->l('If yes, only active hotels will be displayed on map.'), ), 'WK_DISPLAY_PROPERTIES_PAGE_GOOGLE_MAP' => array( - 'title' => $this->l('Display Our Properties page Google map'), + 'title' => $this->l('Display Properties page Google map'), 'cast' => 'intval', 'type' => 'bool', 'default' => '0', @@ -437,7 +437,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'value' => 0, ), ), - 'hint' => $this->l('Enable to display map with hotels locations on the our properties page.'), + 'hint' => $this->l('Enable to display map with hotels locations on the properties page.'), ), 'WK_DISPLAY_CONTACT_PAGE_GOOLGE_MAP' => array( 'title' => $this->l('Display Contact Us page Google map'), diff --git a/themes/hotel-reservation-theme/header.tpl b/themes/hotel-reservation-theme/header.tpl index af7919df6..dc7e76b6b 100644 --- a/themes/hotel-reservation-theme/header.tpl +++ b/themes/hotel-reservation-theme/header.tpl @@ -180,7 +180,7 @@ {/block} {if isset($WK_DISPLAY_PROPERTIES_LINK_IN_HEADER) && $WK_DISPLAY_PROPERTIES_LINK_IN_HEADER} {/if}
diff --git a/themes/hotel-reservation-theme/our-properties.tpl b/themes/hotel-reservation-theme/our-properties.tpl index 720a9d8a8..4ab7714ba 100644 --- a/themes/hotel-reservation-theme/our-properties.tpl +++ b/themes/hotel-reservation-theme/our-properties.tpl @@ -21,11 +21,11 @@ *} {block name='our_properties'} -{capture name=path}{l s='Our Properties'}{/capture} +{capture name=path}{l s='Properties'}{/capture} {if isset($hotelsInfo) && $hotelsInfo} {block name='our_properties_list_title'}
-

{l s='Our Properties'}

+

{l s='Properties'}

{$WK_HTL_SHORT_DESC|escape:'html':'UTF-8'}

From dfa3694a0267db2c4716c002437995b76e385a88 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Fri, 16 Oct 2026 12:57:56 +0530 Subject: [PATCH 12/17] Fixed : text changes --- .../default/template/controllers/cart_rules/conditions.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl index dd2e4f3bc..940a17f8e 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/conditions.tpl @@ -231,7 +231,7 @@
-

{l s='Unselected hotels'}

+

{l s='Unselected Properties'}

-

{l s='Selected hotels'}

+

{l s='Selected Properties'}

- + - + {foreach from=$ttExemptRooms item=ttRoom} - - {assign var="is_full_date" value=($show_full_date && ($ttRoom['date_from']|date_format:'%D' == $ttRoom['date_to']|date_format:'%D'))} + {/foreach} @@ -107,20 +107,22 @@
{l s='Room No.'} {l s='Room Type'}{l s='Property Name'} {l s='Duration'}{l s='Tourism Tax'} {l s='Total Price (Tax incl.)'}
+ {$ttRoom.room_num|escape:'html':'UTF-8'} {$ttRoom.room_type_name|escape:'html':'UTF-8'}{$ttRoom.hotel_name|escape:'html':'UTF-8'}{dateFormat date=$ttRoom.date_from full=$is_full_date} - {dateFormat date=$ttRoom.date_to full=$is_full_date}{convertPriceWithCurrency price=$ttRoom.tourism_tax_total currency=$currency->id} {convertPriceWithCurrency price=$ttRoom.total_room_price_ti currency=$currency->id}
- + + {foreach from=$ttExemptProducts item=ttProduct} - + {/foreach} @@ -145,6 +147,121 @@ +{assign var='ttApplyRooms' value=[]} +{if isset($use_tourism_tax) && $use_tourism_tax && isset($order_detail_data) && $order_detail_data} + {foreach from=$order_detail_data item=ttApplyRoom} + {if isset($ttApplyRoom.tourism_tax_status) && $ttApplyRoom.tourism_tax_status != $tourism_tax_status_applied && $ttApplyRoom.tourism_tax_status != $tourism_tax_status_not_applicable && $ttApplyRoom.id_status != $ROOM_STATUS_CANCELLED && !$ttApplyRoom.is_refunded} + {append var='ttApplyRooms' value=$ttApplyRoom} + {/if} + {/foreach} +{/if} +{assign var='ttApplyProducts' value=[]} +{if isset($use_tourism_tax) && $use_tourism_tax} + {if isset($hotel_service_products) && $hotel_service_products} + {foreach from=$hotel_service_products item=ttApplyProduct} + {if isset($ttApplyProduct.tourism_tax_status) && $ttApplyProduct.tourism_tax_status != $tourism_tax_status_applied && $ttApplyProduct.tourism_tax_status != $tourism_tax_status_not_applicable && !$ttApplyProduct.is_refunded && !$ttApplyProduct.is_cancelled} + {append var='ttApplyProducts' value=$ttApplyProduct} + {/if} + {/foreach} + {/if} + {if isset($standalone_service_products) && $standalone_service_products} + {foreach from=$standalone_service_products item=ttApplyProduct} + {if isset($ttApplyProduct.tourism_tax_status) && $ttApplyProduct.tourism_tax_status != $tourism_tax_status_applied && $ttApplyProduct.tourism_tax_status != $tourism_tax_status_not_applicable && !$ttApplyProduct.is_refunded && !$ttApplyProduct.is_cancelled} + {append var='ttApplyProducts' value=$ttApplyProduct} + {/if} + {/foreach} + {/if} +{/if} + +
{l s='Name'} {l s='Quantity'}{l s='Tourism Tax'} {l s='Total Price (Tax incl.)'}
+ {$ttProduct.name|escape:'html':'UTF-8'}{if $ttProduct.option_name} : {$ttProduct.option_name|escape:'html':'UTF-8'}{/if} {if $ttProduct.allow_multiple_quantity}{$ttProduct.quantity|escape:'html':'UTF-8'}{else}--{/if}{convertPriceWithCurrency price=$ttProduct.tourism_tax_total currency=$currency->id} {convertPriceWithCurrency price=$ttProduct.total_price_tax_incl currency=$currency->id}
+ + + + + + + + + + + {foreach from=$ttApplyRooms item=ttApplyRoom} + + + + + {assign var="is_full_date" value=($show_full_date && ($ttApplyRoom['date_from']|date_format:'%D' == $ttApplyRoom['date_to']|date_format:'%D'))} + + + + {/foreach} + +
{l s='Room No.'}{l s='Room Type'}{l s='Duration'}{l s='Total Price (Tax incl.)'}
+ + {$ttApplyRoom.room_num|escape:'html':'UTF-8'}{$ttApplyRoom.room_type_name|escape:'html':'UTF-8'}{dateFormat date=$ttApplyRoom.date_from full=$is_full_date} - {dateFormat date=$ttApplyRoom.date_to full=$is_full_date}{convertPriceWithCurrency price=$ttApplyRoom.total_room_price_ti currency=$currency->id}
+ + {/if} + {if $ttApplyProducts|count} +
+ + + + + + + + + + + {foreach from=$ttApplyProducts item=ttApplyProduct} + + + + + + + {/foreach} + +
{l s='Name'}{l s='Quantity'}{l s='Total Price (Tax incl.)'}
+ + {$ttApplyProduct.name|escape:'html':'UTF-8'}{if $ttApplyProduct.option_name} : {$ttApplyProduct.option_name|escape:'html':'UTF-8'}{/if}{if $ttApplyProduct.allow_multiple_quantity}{$ttApplyProduct.quantity|escape:'html':'UTF-8'}{else}--{/if}{convertPriceWithCurrency price=$ttApplyProduct.total_price_tax_incl currency=$currency->id}
+
+ {/if} + {if $ttApplyRooms|count > 0 && $ttApplyProducts|count > 0} + + {/if} + + + + + + diff --git a/classes/order/OrderTaxDetail.php b/classes/order/OrderTaxDetail.php index 9d3f96bf1..3459d488d 100644 --- a/classes/order/OrderTaxDetail.php +++ b/classes/order/OrderTaxDetail.php @@ -1310,21 +1310,25 @@ class OrderTaxDetailCore extends ObjectModel } /** - * Apply tourism tax for every booking and every standalone service line of an order; returns only - * the failing entries. A booking/line with nothing applicable (neither the room nor any attached + * Apply tourism tax for the bookings and standalone service lines of an order — every one of them by + * default, or only the given ids; returns only the failing entries. A booking/line with nothing applicable (neither the room nor any attached * service, or the standalone line itself, has a tourism tax rule) is not a failure — it's silently * skipped, same as if it had simply been left alone. * * @param int $idOrder * @param int $idEmployee PS employee id (0 = resolved from Context) * @param string|null $autoMsgLabel Pre-translated "Tourism Tax Applied" label — null skips the Order Notes entry entirely, for every booking/line in the order + * @param int[]|null $idsHtlBooking Only these bookings are applied (ids that don't belong to the order are ignored); null = every booking + * @param int[]|null $idsServiceLines Only these standalone service lines are applied (ids that don't belong to the order are ignored); null = every line * @return array [{'id_htl_booking' => int, 'result' => int}, ...] plus * [{'id_service_product_order_detail' => int, 'result' => int}, ...] — failures only */ - public static function applyForOrder($idOrder, $idEmployee = 0, $autoMsgLabel = null) + public static function applyForOrder($idOrder, $idEmployee = 0, $autoMsgLabel = null, $idsHtlBooking = null, $idsServiceLines = null) { $idOrder = (int) $idOrder; $failures = array(); + $selectedBookingIds = ($idsHtlBooking !== null) ? array_flip(array_map('intval', $idsHtlBooking)) : null; + $selectedServiceLineIds = ($idsServiceLines !== null) ? array_flip(array_map('intval', $idsServiceLines)) : null; $objBookingDetail = new HotelBookingDetail(); $bookings = $objBookingDetail->getBookingDataByOrderId($idOrder); if ($bookings) { @@ -1336,6 +1340,9 @@ class OrderTaxDetailCore extends ObjectModel if (isset($refundedIds[$booking['id']]) || $booking['id_status'] == HotelBookingDetail::STATUS_CANCELLED) { continue; } + if ($selectedBookingIds !== null && !isset($selectedBookingIds[(int) $booking['id']])) { + continue; + } $result = self::applyBooking($booking['id'], $idEmployee, $autoMsgLabel); if ($result !== self::APPLY_OK && $result !== self::APPLY_ERROR_NOT_APPLICABLE) { $failures[] = array('id_htl_booking' => (int) $booking['id'], 'result' => $result); @@ -1343,6 +1350,9 @@ class OrderTaxDetailCore extends ObjectModel } } foreach (ServiceProductOrderDetail::getActiveStandaloneIdsByOrder($idOrder) as $idServiceLine) { + if ($selectedServiceLineIds !== null && !isset($selectedServiceLineIds[$idServiceLine])) { + continue; + } $result = self::applyServiceLine($idServiceLine, $idEmployee, $autoMsgLabel); if ($result !== self::APPLY_OK && $result !== self::APPLY_ERROR_NOT_APPLICABLE) { $failures[] = array('id_service_product_order_detail' => $idServiceLine, 'result' => $result); diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 973e56995..b9c788ebd 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -9254,15 +9254,22 @@ class AdminOrdersControllerCore extends AdminController } /** - * Apply tourism tax to a booking (id_htl_booking), a standalone service line - * (id_service_product_order_detail), or every booking of a whole order (id_order) — - * see OrderTaxDetail::applyBooking()/applyServiceLine(). + * Apply tourism tax to the rooms (id_htl_booking[]) and/or standalone service lines + * (id_service_product_order_detail[]) selected in the apply modal of an order (id_order) — + * see OrderTaxDetail::applyForOrder(). */ public function ajaxProcessApplyTourismTax() { - $idHtlBooking = (int) Tools::getValue('id_htl_booking', 0); - $idServiceProductOrderDetail = (int) Tools::getValue('id_service_product_order_detail', 0); + if ($this->tabAccess['edit'] !== 1) { + die(Tools::jsonEncode(array( + 'hasError' => true, + 'errors' => array(Tools::displayError('You do not have permission to edit this order.')), + ))); + } + $idOrder = (int) Tools::getValue('id_order', 0); + $idsHtlBooking = array_filter(array_map('intval', (array) Tools::getValue('id_htl_booking', array()))); + $idsServiceProductOrderDetail = array_filter(array_map('intval', (array) Tools::getValue('id_service_product_order_detail', array()))); $idEmployee = (int) Context::getContext()->employee->id; $autoMsgLabel = $this->l('Tourism Tax Applied'); $errors = array(); @@ -9271,20 +9278,15 @@ class AdminOrdersControllerCore extends AdminController OrderTaxDetail::APPLY_ERROR_NOT_APPLICABLE => $this->l('Tourism tax is not applicable for this booking.'), ); - if ($idHtlBooking) { - $result = OrderTaxDetail::applyBooking($idHtlBooking, $idEmployee, $autoMsgLabel); - if (isset($messagesByResult[$result])) { - $errors[] = $messagesByResult[$result]; - } - } elseif ($idServiceProductOrderDetail) { - $result = OrderTaxDetail::applyServiceLine($idServiceProductOrderDetail, $idEmployee, $autoMsgLabel); - if (isset($messagesByResult[$result])) { - $errors[] = $messagesByResult[$result]; - } - } elseif ($idOrder) { - $errors = self::tourismTaxErrorsFromResults(OrderTaxDetail::applyForOrder($idOrder, $idEmployee, $autoMsgLabel), $messagesByResult); - } else { + if (!Validate::isLoadedObject(new Order($idOrder))) { $errors[] = $this->l('Invalid request parameters.'); + } elseif (!$idsHtlBooking && !$idsServiceProductOrderDetail) { + $errors[] = Tools::displayError('No booking/products has been selected.'); + } else { + $errors = self::tourismTaxErrorsFromResults( + OrderTaxDetail::applyForOrder($idOrder, $idEmployee, $autoMsgLabel, $idsHtlBooking, $idsServiceProductOrderDetail), + $messagesByResult + ); } die(Tools::jsonEncode(array( From cf2f8e8751d331d1a051df310b515c1f087c8b8d Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Fri, 16 Oct 2026 13:27:10 +0530 Subject: [PATCH 14/17] Fixed: removed brandname and short description from general setting --- controllers/front/OurPropertiesController.php | 1 - .../classes/HotelHelper.php | 18 +---- .../AdminHotelGeneralSettingsController.php | 75 +++---------------- .../hotelreservationsystem.php | 10 +-- .../views/templates/hook/copyRight.tpl | 2 +- .../our-properties.tpl | 6 +- 6 files changed, 17 insertions(+), 95 deletions(-) diff --git a/controllers/front/OurPropertiesController.php b/controllers/front/OurPropertiesController.php index 3df472859..255714524 100644 --- a/controllers/front/OurPropertiesController.php +++ b/controllers/front/OurPropertiesController.php @@ -129,7 +129,6 @@ class OurPropertiesControllerCore extends FrontController 'hotelsInfo' => $hotelsInfo, 'hotelLocationArray' => $hotelLocationArray, 'displayHotelMap' => $displayHotelMap, - 'WK_HTL_SHORT_DESC' => Configuration::get('WK_HTL_SHORT_DESC', $this->context->language->id), 'currentIndex' => $this->context->link->getPageLink('our-properties') ) ); diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index 324f7c4d8..f1aba02d2 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -1126,14 +1126,6 @@ class HotelHelper // lang fields $languages = Language::getLanguages(false); - $htlShortDescLang = array( - 'en' => 'We offer elegant rooms, gourmet dining, and attentive service for a memorable stay.', - 'nl' => 'Wij bieden elegante kamers, gastronomisch dineren en attente service voor een onvergetelijk verblijf.', - 'fr' => 'Nous proposons des chambres élégantes, une cuisine gastronomique et un service attentionné pour un séjour mémorable.', - 'de' => 'Wir bieten elegante Zimmer, Gourmet-Restaurants und aufmerksamen Service für einen unvergesslichen Aufenthalt.', - 'ru' => 'Мы предлагаем элегантные номера, изысканную кухню и внимательное обслуживание для незабываемого отдыха.', - 'es' => 'Ofrecemos habitaciones elegantes, comidas gourmet y un servicio atento para una estadía inolvidable.', - ); $defaultDimensionUnitLang = array( 'en' => 'ft', 'nl' => 'ft', @@ -1142,23 +1134,15 @@ class HotelHelper 'ru' => 'фут', 'es' => 'ft', ); - $WK_HTL_CHAIN_NAME = array(); - $WK_HTL_SHORT_DESC = array(); $defaultDimensionUnit = array(); foreach ($languages as $lang) { - if (isset($htlShortDescLang[$lang['iso_code']])) { - $WK_HTL_SHORT_DESC[$lang['id_lang']] = $htlShortDescLang[$lang['iso_code']]; - $WK_HTL_CHAIN_NAME[$lang['id_lang']] = $homeBannerTitleLang[$lang['iso_code']]; + if (isset($defaultDimensionUnitLang[$lang['iso_code']])) { $defaultDimensionUnit[$lang['id_lang']] = $defaultDimensionUnitLang[$lang['iso_code']]; } else { $defaultDimensionUnit[$lang['id_lang']] = $defaultDimensionUnitLang['en']; - $WK_HTL_CHAIN_NAME[$lang['id_lang']] = $homeBannerTitleLang['en']; - $WK_HTL_SHORT_DESC[$lang['id_lang']] = $htlShortDescLang['en']; } } - Configuration::updateValue('WK_HTL_CHAIN_NAME', $WK_HTL_CHAIN_NAME); - Configuration::updateValue('WK_HTL_SHORT_DESC', $WK_HTL_SHORT_DESC); Configuration::updateValue('WK_DIMENSION_UNIT', $defaultDimensionUnit); // Search Fields diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php index 25b8279bc..1797295e6 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php @@ -124,39 +124,15 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'generalsetting' => array( 'title' => $this->l('Website Configuration'), 'fields' => array( - 'WK_HTL_CHAIN_NAME' => array( - 'title' => $this->l('Property Brand Name'), - 'type' => 'textLang', - 'lang' => true, - 'required' => true, - 'validation' => 'isGenericName', - 'hint' => $this->l('Enter Property name in case of single property or enter your properties chain name in case of multiple properties.'), - ), - 'WK_HTL_SHORT_DESC' => array( - 'title' => $this->l('Property Short Description'), - 'type' => 'textareaLang', - 'lang' => true, - 'required' => true, - 'rows' => '4', - 'cols' => '2', - 'validation' => 'isGenericName', - 'hint' => $this->l('This will display property short description in footer. Note: number of letters must be less than 220.'), - ), 'WK_PRIMARY_HOTEL' => array( 'title' => $this->l('Primary property'), 'hint' => $this->l('Primary property is used to default address for your business. The property address will be considered as your registered business address.'), 'type' => 'select', 'identifier' => 'id', 'list' => $hotelsInfo, - ), - 'WK_HTL_ESTABLISHMENT_YEAR' => array( - 'title' => $this->l('Website Launch Year'), - 'hint' => $this->l('The year when your hotel site was launched.'), - 'type' => 'text', - 'class' => 'fixed-width-xxl', ), 'WK_DISPLAY_PROPERTIES_LINK_IN_HEADER' => array( - 'title' => $this->l('Display Our Properties link in Header'), + 'title' => $this->l('Display Properties link in Header'), 'cast' => 'intval', 'type' => 'bool', 'default' => '0', @@ -170,7 +146,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'value' => 0, ), ), - 'hint' => $this->l('Display Our Properties link in header in the front office'), + 'hint' => $this->l('Display Properties link in header in the front office'), ), 'WK_DISPLAY_CONTACT_PAGE_HOTEL_LIST' => array( 'title' => $this->l('Display Contact Page Hotel List'), @@ -232,6 +208,12 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'required' => true, 'type' => 'text' ), + 'WK_HTL_ESTABLISHMENT_YEAR' => array( + 'title' => $this->l('Website Launch Year'), + 'hint' => $this->l('The year when your hotel site was launched.'), + 'type' => 'text', + 'class' => 'fixed-width-xxl', + ), 'PS_SHOP_PHONE' => array( 'title' => $this->l('Phone'), 'validation' => 'isGenericName', @@ -423,7 +405,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'hint' => $this->l('If yes, only active hotels will be displayed on map.'), ), 'WK_DISPLAY_PROPERTIES_PAGE_GOOGLE_MAP' => array( - 'title' => $this->l('Display Our Properties page Google map'), + 'title' => $this->l('Display Properties page Google map'), 'cast' => 'intval', 'type' => 'bool', 'default' => '0', @@ -437,7 +419,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'value' => 0, ), ), - 'hint' => $this->l('Enable to display map with hotels locations on the our properties page.'), + 'hint' => $this->l('Enable to display map with hotels locations on the properties page.'), ), 'WK_DISPLAY_CONTACT_PAGE_GOOLGE_MAP' => array( 'title' => $this->l('Display Contact Us page Google map'), @@ -540,29 +522,6 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController $this->errors[] = $this->l('Property name search threshold field is invalid.'); } - if (!trim(Tools::getValue('WK_HTL_CHAIN_NAME_'.$defaultLangId))) { - $this->errors[] = $this->l('Property chain name is required at least in ').$objDefaultLanguage['name']; - } else { - foreach ($languages as $lang) { - if (trim(Tools::getValue('WK_HTL_CHAIN_NAME_'.$lang['id_lang']))) { - if (!Validate::isGenericName(Tools::getValue('WK_HTL_CHAIN_NAME_'.$lang['id_lang']))) { - $this->errors[] = $this->l('Invalid property chain name in ').$lang['name']; - } - } - } - } - if (!trim(Tools::getValue('WK_HTL_SHORT_DESC_'.$defaultLangId))) { - $this->errors[] = $this->l('Property short description is required at least in '). - $objDefaultLanguage['name']; - } else { - foreach ($languages as $lang) { - if (trim(Tools::getValue('WK_HTL_SHORT_DESC_'.$lang['id_lang']))) { - if (!Validate::isGenericName(Tools::getValue('WK_HTL_SHORT_DESC_'.$lang['id_lang']))) { - $this->errors[] = $this->l('Invalid property short description in ').$lang['name']; - } - } - } - } if (!Validate::isUnsignedInt(Tools::getValue('WK_ADVANCED_PAYMENT_GLOBAL_MIN_AMOUNT'))) { $this->errors[] = $this->l('Invalid minimum partial payment percentage.'); } elseif (Tools::getValue('WK_ADVANCED_PAYMENT_GLOBAL_MIN_AMOUNT') <= 0) { @@ -604,20 +563,6 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController $_POST['WK_HOTEL_NAME_ENABLE'] = 1; } } - foreach ($languages as $lang) { - // if lang fileds are at least in default language and not available in other languages then - // set empty fields value to default language value - if (!trim(Tools::getValue('WK_HTL_CHAIN_NAME_'.$lang['id_lang']))) { - $_POST['WK_HTL_CHAIN_NAME_'.$lang['id_lang']] = trim( - Tools::getValue('WK_HTL_CHAIN_NAME_'.$defaultLangId) - ); - } - if (!trim(Tools::getValue('WK_HTL_SHORT_DESC_'.$lang['id_lang']))) { - $_POST['WK_HTL_SHORT_DESC_'.$lang['id_lang']] = trim( - Tools::getValue('WK_HTL_SHORT_DESC_'.$defaultLangId) - ); - } - } parent::postProcess(); if (empty($this->errors)) { Tools::redirectAdmin(self::$currentIndex.'&conf=6&token='.$this->token); diff --git a/modules/hotelreservationsystem/hotelreservationsystem.php b/modules/hotelreservationsystem/hotelreservationsystem.php index ad105af85..c9a8521e3 100644 --- a/modules/hotelreservationsystem/hotelreservationsystem.php +++ b/modules/hotelreservationsystem/hotelreservationsystem.php @@ -48,7 +48,6 @@ class HotelReservationSystem extends Module $resources = array( 'hotels' => array('description' => 'Hotel Branch Information','class' => 'HotelBranchInformation'), 'hotel_room_types' => array('description' => 'Hotel room types','class' => 'HotelRoomType'), - 'property_types' => array('description' => 'Hotel property types', 'class' => 'HotelPropertyType'), 'hotel_amenities' => array('description' => 'The hotel amenities', 'class' => 'HotelAmenities'), 'hotel_refund_rules' => array('description' => 'The hotel refund rules','class' => 'HotelOrderRefundRules'), 'hotel_rooms' => array('description' => 'The hotel rooms','class' => 'HotelRoomInformation'), @@ -358,7 +357,7 @@ class HotelReservationSystem extends Module $this->context->smarty->assign( array( 'WK_HTL_ESTABLISHMENT_YEAR' => Configuration::get('WK_HTL_ESTABLISHMENT_YEAR'), - 'WK_HTL_CHAIN_NAME' => Configuration::get('WK_HTL_CHAIN_NAME', $this->context->language->id), + 'WK_HTL_CHAIN_NAME' => Configuration::get('PS_SHOP_NAME'), ) ); return $this->display(__FILE__, 'copyRight.tpl'); @@ -452,12 +451,6 @@ class HotelReservationSystem extends Module //If Admin update new language when we do entry in module all lang tables. HotelHelper::updateLangTables($newIdLang, $langTables); - // update configuration keys - $configKeys = array( - 'WK_HTL_CHAIN_NAME', - 'WK_HTL_SHORT_DESC', - ); - HotelHelper::updateConfigurationLangKeys($newIdLang, $configKeys); } } @@ -600,6 +593,7 @@ class HotelReservationSystem extends Module 'WK_ROOM_LEFT_WARNING_NUMBER', 'WK_HTL_ESTABLISHMENT_YEAR', 'WK_HTL_CHAIN_NAME', + 'WK_HTL_SHORT_DESC', 'WK_HTL_TAG_LINE', 'WK_TITLE_HEADER_BLOCK', 'WK_CONTENT_HEADER_BLOCK', diff --git a/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl b/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl index eb3541799..d8380154f 100644 --- a/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl +++ b/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl @@ -1,5 +1,5 @@
\ No newline at end of file diff --git a/themes/hotel-reservation-theme/our-properties.tpl b/themes/hotel-reservation-theme/our-properties.tpl index 720a9d8a8..214db265f 100644 --- a/themes/hotel-reservation-theme/our-properties.tpl +++ b/themes/hotel-reservation-theme/our-properties.tpl @@ -21,13 +21,13 @@ *} {block name='our_properties'} -{capture name=path}{l s='Our Properties'}{/capture} +{capture name=path}{l s='Properties'}{/capture} {if isset($hotelsInfo) && $hotelsInfo} {block name='our_properties_list_title'}
-

{l s='Our Properties'}

+

{l s='Properties'}

-

{$WK_HTL_SHORT_DESC|escape:'html':'UTF-8'}

+

{l s='Enjoy a welcoming atmosphere, essential comforts, and a pleasant stay.'}

{/block} From 44cefb75dcbb9d18288b52cce9c26d1dc561b24e Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Fri, 16 Oct 2026 14:51:47 +0530 Subject: [PATCH 15/17] Fixed: Footer copyright text design --- .../views/css/qhrs_header_media.css | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/hotelreservationsystem/views/css/qhrs_header_media.css b/modules/hotelreservationsystem/views/css/qhrs_header_media.css index 5645b2563..9669e2622 100644 --- a/modules/hotelreservationsystem/views/css/qhrs_header_media.css +++ b/modules/hotelreservationsystem/views/css/qhrs_header_media.css @@ -214,4 +214,18 @@ .js-header-media-next { right: 15px; -} \ No newline at end of file +} +/* ===== copyRight.tpl (footer copyright) ===== */ +.copyRightWrapper { + background-color: #242424; + padding: 30px; + width: 100%; +} +.copyRightWrapper .copyRight { + color: #868686; + font-size: 16px; + font-weight: 400; + margin: 0; + text-align: center; + line-height: 23px; +} From d294c45077b244235ee6dceb1d8df94c1f32f2c7 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Fri, 16 Oct 2026 17:56:49 +0530 Subject: [PATCH 16/17] Fixed: document text and logo issue --- classes/pdf/PDFGenerator.php | 2 +- controllers/admin/AdminThemesController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/pdf/PDFGenerator.php b/classes/pdf/PDFGenerator.php index 4cd27a6bb..691ad828b 100644 --- a/classes/pdf/PDFGenerator.php +++ b/classes/pdf/PDFGenerator.php @@ -214,7 +214,7 @@ class PDFGeneratorCore extends TCPDF { $this->SetHeaderMargin(5); $this->SetFooterMargin(21); - $this->setMargins(10, 40, 10); + $this->setMargins(10, 45, 10); $this->AddPage(); $this->writeHTML($this->content, true, false, true, false, ''); } diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index aefb0df4d..b28b032df 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -138,7 +138,7 @@ class AdminThemesControllerCore extends AdminController 'icon' => 'icon-html5', 'tabs' => array( 'logo' => $this->l('Logo'), - 'logo2' => $this->l('Invoice & Email Logos'), + 'logo2' => $this->l('Documents Logos'), 'icons' => $this->l('Icons'), 'mobile' => $this->l('Mobile'), ), From ebab1dbcbfd129d397a57203a1285b6ff2f8819b Mon Sep 17 00:00:00 2001 From: amit sharma Date: Fri, 16 Oct 2026 19:13:31 +0530 Subject: [PATCH 17/17] Fixed: review changes --- controllers/admin/AdminThemesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index b28b032df..e5e4bf17b 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -138,7 +138,7 @@ class AdminThemesControllerCore extends AdminController 'icon' => 'icon-html5', 'tabs' => array( 'logo' => $this->l('Logo'), - 'logo2' => $this->l('Documents Logos'), + 'logo2' => $this->l('Documents & Email Logos'), 'icons' => $this->l('Icons'), 'mobile' => $this->l('Mobile'), ),