From 5709b78f39795701d28e1a42383f75e986545d21 Mon Sep 17 00:00:00 2001
From: "vishalsingh.qlo325"
Date: Thu, 11 Jan 2024 10:29:01 +0530
Subject: [PATCH 1/2] added new hooks for the dashboard and for order-opc page.
---
controllers/admin/AdminDashboardController.php | 11 ++++++++++-
.../views/templates/hook/dashboard-zone-two.tpl | 2 ++
themes/hotel-reservation-theme/order-opc.tpl | 2 ++
themes/hotel-reservation-theme/shopping-cart.tpl | 1 +
4 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/controllers/admin/AdminDashboardController.php b/controllers/admin/AdminDashboardController.php
index 5f2d57bac..4ccac4420 100644
--- a/controllers/admin/AdminDashboardController.php
+++ b/controllers/admin/AdminDashboardController.php
@@ -386,7 +386,16 @@ class AdminDashboardControllerCore extends AdminController
'extra' => Tools::getValue('extra')
);
- die(json_encode(Hook::exec('dashboardData', $params, $id_module, true, true, (int)Tools::getValue('dashboard_use_push'))));
+ // code to be added.
+ $data = Hook::exec('dashboardData', $params, $id_module, true, true, (int)Tools::getValue('dashboard_use_push'));
+ Hook::exec('actionDashboardDataModifier', array(
+ 'data' => &$data,
+ 'params' => $params,
+ 'id_module' => $id_module,
+ 'dashboard_use_push' => (int)Tools::getValue('dashboard_use_push')
+ ));
+
+ $this->ajaxDie(json_encode($data));
}
public function ajaxProcessSetSimulationMode()
diff --git a/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl b/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl
index 18185c442..e0d23758e 100644
--- a/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl
+++ b/modules/dashguestcycle/views/templates/hook/dashboard-zone-two.tpl
@@ -61,6 +61,7 @@
0
+ {hook h='displayDashGuestCycleTab'}
@@ -94,6 +95,7 @@
+ {hook h='displayDashGuestCycleTabContent'}
diff --git a/themes/hotel-reservation-theme/order-opc.tpl b/themes/hotel-reservation-theme/order-opc.tpl
index 8cdc91e23..8f4c0901c 100644
--- a/themes/hotel-reservation-theme/order-opc.tpl
+++ b/themes/hotel-reservation-theme/order-opc.tpl
@@ -313,6 +313,8 @@
{/if}
+ {hook h="displayCartTotalPriceLabel" type='before_tax'}
+
{l s='Total tax'}
{displayPrice price=($total_tax)}
diff --git a/themes/hotel-reservation-theme/shopping-cart.tpl b/themes/hotel-reservation-theme/shopping-cart.tpl
index 3b943c6d9..49a12bae8 100644
--- a/themes/hotel-reservation-theme/shopping-cart.tpl
+++ b/themes/hotel-reservation-theme/shopping-cart.tpl
@@ -203,6 +203,7 @@
+ {hook h='displayCartProductContentAfter' cart_detail=$data_v key=$rm_k}
From 7353f0f517f58bafc56f7353a47371dd673db936 Mon Sep 17 00:00:00 2001
From: "vishalsingh.qlo325"
Date: Tue, 13 Feb 2024 12:15:45 +0530
Subject: [PATCH 2/2] added new hooks in AdminHotelRoomsBooking and admin order
---
.../controllers/orders/_current_cart_details_data.tpl | 2 +-
.../helpers/view/_partials/booking-rooms.tpl | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl
index 2f421b9a4..214705745 100644
--- a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl
+++ b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl
@@ -46,7 +46,7 @@
{assign var=curr_id value=$cart->id_currency|intval}
{foreach from=$cart_detail_data item=data}
- | {$data.room_num|escape:'html':'UTF-8'} |
+ {$data.room_num|escape:'html':'UTF-8'} {hook h='displayRoomNumAfter' data=$data type='adminOrder'} |
 |
{$data.room_type|escape:'html':'UTF-8'}
diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl
index 21f4c0e7b..813eccb13 100644
--- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl
+++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl
@@ -40,7 +40,7 @@
|
{foreach from=$book_v['data']['available'] key=avai_k item=avai_v}
- | {$avai_v['room_num']|escape:'htmlall':'UTF-8'} |
+ {$avai_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$avai_v type='available'} |
{dateFormat date=date('Y-m-d', strtotime($date_from))} - {dateFormat date=date('Y-m-d', strtotime($date_to))} |
{$avai_v['room_comment']|escape:'htmlall':'UTF-8'} |
@@ -129,7 +129,7 @@
{dateFormat date=date('Y-m-d', strtotime($part_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($part_v['date_to']))}
|
{/if}
- {$sub_part_v['room_num']|escape:'htmlall':'UTF-8'} |
+ {$sub_part_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$sub_part_v type='partially_available'} |
{foreach $allotment_types as $allotment_type}
|