From 3654764f086f96e8ee3ce952142e0edf707c23e6 Mon Sep 17 00:00:00 2001 From: aradhana kumari Date: Mon, 20 Jul 2026 15:08:07 +0530 Subject: [PATCH 1/6] Add hooks to include extra column for displaying additional information in the order detail Co-authored-by: Name --- .../themes/default/template/controllers/orders/_product_line.tpl | 1 + .../template/controllers/orders/_rooms_informaion_table.tpl | 1 + 2 files changed, 2 insertions(+) diff --git a/admin/themes/default/template/controllers/orders/_product_line.tpl b/admin/themes/default/template/controllers/orders/_product_line.tpl index 205c0c5e8..7c65f79b4 100644 --- a/admin/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin/themes/default/template/controllers/orders/_product_line.tpl @@ -111,6 +111,7 @@ {/if} {/if} + {hook h='displayOrderRoomsBookingsTableData' order=$order data=$data} {if ($can_edit && !$order->hasBeenDelivered())}
diff --git a/admin/themes/default/template/controllers/orders/_rooms_informaion_table.tpl b/admin/themes/default/template/controllers/orders/_rooms_informaion_table.tpl index 743254785..609252a92 100644 --- a/admin/themes/default/template/controllers/orders/_rooms_informaion_table.tpl +++ b/admin/themes/default/template/controllers/orders/_rooms_informaion_table.tpl @@ -40,6 +40,7 @@ {l s='Refund/Cancel Status'} {l s='Refunded amount'} {/if} + {hook h='displayOrderRoomsBookingsTableHeading' order=$order} {if ($can_edit && !$order->hasBeenDelivered())} {l s='Actions'} {/if} From 11b90c76db0f9b1861e51e6d454b83d08879c73b Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Thu, 15 Oct 2026 09:55:47 +0530 Subject: [PATCH 2/6] new hooks added --- .../controllers/normal_products/prices.tpl | 1 + .../orders/_current_cart_details_data.tpl | 3 ++ .../controllers/orders/_product_line.tpl | 1 + .../template/controllers/orders/form.tpl | 3 ++ .../controllers/orders/helpers/view/view.tpl | 2 + .../orders/modals/_edit_room_booking.tpl | 2 + ..._services_service_products_tab_content.tpl | 5 +++ .../controllers/products/informations.tpl | 1 + .../default/template/helpers/kpi/row.tpl | 1 + .../template/helpers/list/list_content.tpl | 2 + classes/Cart.php | 4 +- classes/Mail.php | 20 ++++++++-- classes/Product.php | 13 +++++++ .../admin/AdminNormalProductsController.php | 2 + controllers/admin/AdminOrdersController.php | 38 +++++++++++++++++++ controllers/admin/AdminProductsController.php | 14 +++++++ mails/en/booking_extra_demands.tpl | 1 + .../classes/HotelBookingDetail.php | 26 +++++++++++++ .../classes/HotelBranchInformation.php | 2 + .../classes/HotelHelper.php | 2 + .../classes/HotelRoomInformation.php | 5 +++ .../classes/HotelRoomTypeFeaturePricing.php | 6 +++ .../classes/RoomTypeServiceProduct.php | 6 +++ .../classes/ServiceProductCartDetail.php | 8 ++++ pdf/invoice.extra-demands-tab.tpl | 1 + .../_partials/cart_booking_demands.tpl | 1 + .../_partials/order-extra-services.tpl | 1 + .../_partials/order-room-detail.tpl | 1 + .../_partials/room_type_list.tpl | 1 + themes/hotel-reservation-theme/cms.tpl | 1 + .../hotel-reservation-theme/contact-form.tpl | 1 + .../order-confirmation.tpl | 2 + .../order-opc-new-account.tpl | 1 + themes/hotel-reservation-theme/order-opc.tpl | 1 + 34 files changed, 175 insertions(+), 4 deletions(-) diff --git a/admin/themes/default/template/controllers/normal_products/prices.tpl b/admin/themes/default/template/controllers/normal_products/prices.tpl index bae5d1211..871c90d1e 100644 --- a/admin/themes/default/template/controllers/normal_products/prices.tpl +++ b/admin/themes/default/template/controllers/normal_products/prices.tpl @@ -219,6 +219,7 @@ $(document).ready(function () {
+ {hook h='displayAdminProductPriceCalculationMethodAfter' product=$product} {* As no use in QloApps currently so commented *} {*
{include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"}
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 083021418..e54d89523 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 @@ -26,6 +26,7 @@
{l s='Cart Details'} + {hook h='displayAdminCartDetailsHeader'}
@@ -120,6 +121,7 @@
+ {hook h='displayAdminOrderCartRoomCellAfterOccupancy' data=$data} {/if} @@ -145,6 +147,7 @@ + {hook h='displayAfterAdminCartDetailsDeleteAction' data=$data}
 {l s='Services'} diff --git a/admin/themes/default/template/controllers/orders/_product_line.tpl b/admin/themes/default/template/controllers/orders/_product_line.tpl index 7c65f79b4..c2320eb5d 100644 --- a/admin/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin/themes/default/template/controllers/orders/_product_line.tpl @@ -66,6 +66,7 @@ {else} {if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} {/if} + {hook h='displayAdminOrderOccupancyColumn' data=$data}

diff --git a/admin/themes/default/template/controllers/orders/form.tpl b/admin/themes/default/template/controllers/orders/form.tpl index 1482462e9..9c5e562d0 100644 --- a/admin/themes/default/template/controllers/orders/form.tpl +++ b/admin/themes/default/template/controllers/orders/form.tpl @@ -2331,6 +2331,7 @@ + {hook h="displayAdminBeforeOrderMessage"}

@@ -2427,12 +2428,14 @@

{l s='Select or type the payment method using which payment for booking will be made.'}

+ {hook h="displayOrderPaymentSelectionAfter"}
+ {hook h="displayAdminAddOrderFormFieldsAfter"}
diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl index 8fb331302..9a35ad393 100644 --- a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl @@ -46,6 +46,7 @@ {l s='Total Price (tax excl.)'} {l s='Total Price (tax incl.)'} {l s='Action'} + {hook h="displayAdminOrderExtraServicesTabContentHeading"} @@ -90,6 +91,7 @@ {displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency} {displayPrice price=$service['total_price_tax_incl']|escape:'html':'UTF-8' currency=$orderCurrency} + {hook h="displayAdminOrderExtraServicesTabContentData" id_service_product=$service['id_product'] id_htl_booking_detail=$id_booking_detail id_service_product_order_detail=$service['id_service_product_order_detail'] room_type_id_product=$additionalServices['room_type_id_product']} {/foreach} {else} @@ -120,6 +122,7 @@ {l s='Quantity'} {l s='Unit Price (tax excl.)'} + {hook h="displayAdminOrderExtraServicesTabContentHeading"} @@ -157,6 +160,7 @@ {/if}
+ {hook h="displayAdminOrderExtraServicesTabContentData" id_service_product=$product['id_product'] id_htl_booking_detail=$id_booking_detail} {/foreach} @@ -260,6 +264,7 @@ {l s='Unit Price (tax excl.)'} {l s='Total Price (tax excl.)'} {l s='Total Price (tax incl.)'} + {hook h="displayAdminOrderExtraServicesTabContentHeading"} diff --git a/admin/themes/default/template/controllers/products/informations.tpl b/admin/themes/default/template/controllers/products/informations.tpl index c8716ea36..67be18ef7 100644 --- a/admin/themes/default/template/controllers/products/informations.tpl +++ b/admin/themes/default/template/controllers/products/informations.tpl @@ -187,6 +187,7 @@
+ {hook h='displayAddExtraProductInformation' item=$product} diff --git a/admin/themes/default/template/helpers/kpi/row.tpl b/admin/themes/default/template/helpers/kpi/row.tpl index 50090b691..53fe846b5 100644 --- a/admin/themes/default/template/helpers/kpi/row.tpl +++ b/admin/themes/default/template/helpers/kpi/row.tpl @@ -23,6 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *} +{hook h='displayBeforeKpi'}
{foreach from=$kpis item=kpi} diff --git a/admin/themes/default/template/helpers/list/list_content.tpl b/admin/themes/default/template/helpers/list/list_content.tpl index 169041dc6..99f826656 100644 --- a/admin/themes/default/template/helpers/list/list_content.tpl +++ b/admin/themes/default/template/helpers/list/list_content.tpl @@ -169,6 +169,8 @@ {$compiled_actions[] = $tr.$action} {/if} {/foreach} + {capture assign='row_actions_before_delete'}{hook h='displayAdminListRowActionsBeforeDelete' table=$table identifier=$identifier id=$tr.$identifier token=$token}{/capture} + {if $row_actions_before_delete}{$compiled_actions[] = $row_actions_before_delete}{/if} {if $compiled_actions|count > 0} {if $compiled_actions|count > 1}
{/if}
diff --git a/classes/Cart.php b/classes/Cart.php index d7421ec7d..ad1330b58 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -1073,6 +1073,7 @@ class CartCore extends ObjectModel unset(self::$_totalWeight[$this->id]); } + $isCatalogMode = (Configuration::get('PS_CATALOG_MODE') && !defined('_PS_ADMIN_DIR_')); Hook::exec('actionBeforeCartUpdateQty', array( 'cart' => $this, 'product' => $product, @@ -1083,11 +1084,12 @@ class CartCore extends ObjectModel 'id_address_delivery' => $id_address_delivery, 'shop' => $shop, 'auto_add_cart_rule' => $auto_add_cart_rule, + 'enable_catalog_mode' => &$isCatalogMode )); if ((int)$quantity <= 0) { return $this->deleteProduct($id_product, $id_product_attribute, (int)$id_customization, 0, $auto_add_cart_rule); - } elseif (Configuration::get('PS_CATALOG_MODE') && !defined('_PS_ADMIN_DIR_')) { + } elseif ($isCatalogMode) { return false; } else { /* Check if the product is already in the cart */ diff --git a/classes/Mail.php b/classes/Mail.php index b11a45225..28e2e9799 100644 --- a/classes/Mail.php +++ b/classes/Mail.php @@ -264,6 +264,13 @@ class MailCore extends ObjectModel $transport = new SendmailTransport(); } + // Allow modules to supply a different mail transport (e.g. a third-party + // email API provider) instead of the SMTP/sendmail transport chosen above. + Hook::exec('actionMailAlterTransportBeforeSend', array( + 'configuration' => $configuration, + 'transport' => &$transport, + )); + $mailer = new Mailer($transport); /* Get templates content */ $iso = Language::getIsoById((int)$id_lang); @@ -414,10 +421,11 @@ class MailCore extends ObjectModel $email->from(new Address($from, (string) $from_name)); // Hook to alter Symfony Mailer before sending mail - Hook::exec('actionMailAlterMessageBeforeSend', [ - 'message' => &$message, + Hook::exec('actionMailAlterMessageBeforeSend', array( + 'template' => &$template, 'message' => &$email, - ]); + 'template_vars' => $template_vars, + )); $mailer->send($email); @@ -518,6 +526,12 @@ class MailCore extends ObjectModel $transport = new SendmailTransport(); } + // Same extension point as Send(), so the test email also uses the transport supplied by modules. + Hook::exec('actionMailAlterTransportBeforeSend', array( + 'configuration' => array('PS_MAIL_METHOD' => Configuration::get('PS_MAIL_METHOD')), + 'transport' => &$transport, + )); + $mailer = new Mailer($transport); $email = (new Email()) ->from($from) diff --git a/classes/Product.php b/classes/Product.php index fc962d3c0..7410ca60e 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -3294,6 +3294,14 @@ class ProductCore extends ObjectModel $sql->select('product_option.id_product_option, product_option.price_impact as option_impact_price'); $sql->leftJoin('product_option', 'product_option', '(product_option.id_product = p.id_product AND product_option.id_product_option = '.(int)$id_product_option.')'); } + + Hook::exec('actionAdminProductPriceSqlModifier', array( + 'id_product' => $id_product, + 'id_product_option' => $id_product_option, + 'id_shop' => $id_shop, + 'sql' => &$sql, + )); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); if (is_array($res) && count($res)) { @@ -3388,6 +3396,11 @@ class ProductCore extends ObjectModel $id_tax_rule_group = Product::getIdTaxRulesGroupByIdProduct((int)$id_product, $context); } + Hook::exec('actionProductTaxRuleGroupModifier', array( + 'id_product' => $id_product, + 'id_tax_rule_group' => &$id_tax_rule_group + )); + $tax_manager = TaxManagerFactory::getManager($address, $id_tax_rule_group); $product_tax_calculator = $tax_manager->getTaxCalculator(); diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index 43838ccc8..87f0ac985 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -238,6 +238,8 @@ class AdminNormalProductsControllerCore extends AdminController // Code For Standard product working $this->_where .= ' AND a.`selling_preference_type` = '.(int)Product::SELLING_PREFERENCE_WITH_ROOM_TYPE; + Hook::exec('actionFilterAdminProducts', array('join' => &$this->_join, 'where' => &$this->_where)); + $this->_group = 'GROUP BY a.`id_product`'; $this->fields_list = array(); diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index bcbe5868c..a5b7ce144 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -533,6 +533,12 @@ class AdminOrdersControllerCore extends AdminController if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP && isset($this->toolbar_btn['new']) && Shop::isFeatureActive()) { unset($this->toolbar_btn['new']); } + + Hook::exec('actionOrderDetailToolbarModifier', array( + 'toolbar_btn' => &$this->toolbar_btn, + 'id_order' => (int) Tools::getValue('id_order') + )); + return $res; } @@ -2195,6 +2201,11 @@ class AdminOrdersControllerCore extends AdminController } } + Hook::exec('actionAdminOrderValidateBefore', array( + 'cart' => $objCart, + 'errors' => &$this->errors + )); + if (!count($this->errors)) { // Set payment module details @@ -2268,6 +2279,11 @@ class AdminOrdersControllerCore extends AdminController } if ($objPaymentModule->currentOrder) { + Hook::exec('actionAdminOrderAddAfter', array( + 'cart' => $objCart, + 'order' => new Order((int) $objPaymentModule->currentOrder) + )); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$objPaymentModule->currentOrder.'&vieworder'.'&token='.$this->token.'&conf=3'); } } @@ -6346,6 +6362,14 @@ class AdminOrdersControllerCore extends AdminController } $this->sendChangedNotification($order); + + Hook::exec('actionHotelRoomBookingUpdateAfter', array( + 'id_order' => $id_order, + 'id_room' => $id_room, + 'date_from' => $new_date_from, + 'date_to' => $new_date_to + )); + die(json_encode(array( 'result' => $res, 'view' => $view, @@ -8803,6 +8827,11 @@ class AdminOrdersControllerCore extends AdminController { $idHotelBookingDetail = (int) Tools::getValue('id_hotel_booking_detail'); if (Validate::isLoadedObject($objHotelBookingDetail = new HotelBookingDetail($idHotelBookingDetail))) { + Hook::exec('actionAdminOnChangeRoomStatus', array( + 'post_data' => Tools::getAllValues(), + 'errors' => &$this->errors + )); + $newStatus = (int) Tools::getValue('booking_order_status'); // date choosen for the status change if ($statusDate = Tools::getValue('status_date')) { @@ -8846,6 +8875,15 @@ class AdminOrdersControllerCore extends AdminController } } + Hook::exec('actionRoomBookingStatusUpdateBefore', array( + 'id_hotel_booking_detail' => $objHotelBookingDetail->id, + 'id_order' => $objHotelBookingDetail->id_order, + 'id_room' => $objHotelBookingDetail->id_room, + 'new_status' => $newStatus, + 'status_date' => $statusDate, + 'errors' => &$this->errors + )); + if (empty($this->errors)) { $id_order = $objHotelBookingDetail->id_order; diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index e6dc66674..ea5beb206 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -151,6 +151,20 @@ class AdminProductsControllerCore extends AdminController } } + // Allow modules to override the labels of the product tabs + $tabNameOverrides = Hook::exec('displayUpdateProductTabName', array('id_product' => (int) Tools::getValue('id_product')), null, true); + if (is_array($tabNameOverrides)) { + foreach ($tabNameOverrides as $moduleOverrides) { + if (is_array($moduleOverrides)) { + foreach ($moduleOverrides as $key => $newLabel) { + if (isset($this->available_tabs_lang[$key])) { + $this->available_tabs_lang[$key] = $newLabel; + } + } + } + } + } + if (Tools::getValue('productFilter_a!id_category_default') === '') { $this->context->cookie->id_category_room_types_filter = false; } diff --git a/mails/en/booking_extra_demands.tpl b/mails/en/booking_extra_demands.tpl index fe38cdadd..bcf9a7bf9 100644 --- a/mails/en/booking_extra_demands.tpl +++ b/mails/en/booking_extra_demands.tpl @@ -92,6 +92,7 @@ {$service['name']} + {hook h='displayPartyServiceProductDatesInvoiceAndEmail' id_service_product_order_detail=$service['id_service_product_order_detail']} diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 68086cde4..1c88225d4 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -760,6 +760,19 @@ class HotelBookingDetail extends ObjectModel $unavailableRoomTypes = array(); $avai_rooms = Db::getInstance()->executeS($sql); + + Hook::exec('actionAvailableRoomData', array( + 'avai_rooms' => &$avai_rooms, + 'unavailableRoomTypes' => &$unavailableRoomTypes, + 'params' => array( + 'id_hotel' => $idHotel, + 'id_product' => $idRoomType, + 'date_from' => $dateFrom, + 'date_to' => $dateTo, + 'all_params' => $allParams + ) + )); + if ($avai_rooms) { $availableRoomTypes = array( 'roomTypes' => array(), @@ -1302,6 +1315,19 @@ class HotelBookingDetail extends ObjectModel // free space unset($roomTypeDetail); + Hook::exec('actionPartiallyAvailableRoomData', array( + 'dateWiseRoomTypes' => &$dateWiseRoomTypes, + 'dateWiseCartRooms' => &$dateWiseCartRooms, + 'unavailableRoomTypes' => &$unavailableRoomTypes, + 'params' => array( + 'id_hotel' => $idHotel, + 'id_product' => $idRoomType, + 'date_from' => $dateFrom, + 'date_to' => $dateTo, + 'all_params' => $allParams + ) + )); + // Return room type wise instead of date wise foreach ($dateWiseRoomTypes as $timeStamp => $dateWiseDetail) { foreach ($dateWiseDetail['roomTypes'] as $idProduct => $roomTypeDetail) { diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index 0797c7035..fa6903491 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -492,6 +492,8 @@ class HotelBranchInformation extends ObjectModel LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbl ON (hbl.`id` = hbi.`id` AND hbl.`id_lang` = '.(int)$idLang.')'; + Hook::exec('actionFilterSellerHotel', array('query' => &$sql)); + return Db::getInstance()->executeS($sql); } diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index f7f4f1c2b..15d64f624 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -3070,6 +3070,8 @@ class HotelHelper INNER JOIN `'._DB_PREFIX_.'category` AS c ON (hbi.`id_category` = c.`id_category`) WHERE 1'; + Hook::exec('actionFilterSellerHotel', array('treeQuery' => &$sql)); + if ($cities) { $sql .= ' AND c.`id_parent` IN ('.implode(', ', $cities).')'; } diff --git a/modules/hotelreservationsystem/classes/HotelRoomInformation.php b/modules/hotelreservationsystem/classes/HotelRoomInformation.php index a3ff65ac3..7f6b36b3e 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomInformation.php +++ b/modules/hotelreservationsystem/classes/HotelRoomInformation.php @@ -158,6 +158,9 @@ class HotelRoomInformation extends ObjectModel 'status' => self::getRoomStatusTitle(HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) ), ); + + Hook::exec('actionAdminRoomStatusModifier', array('status' => &$status)); + return $status; } @@ -172,6 +175,8 @@ class HotelRoomInformation extends ObjectModel HotelRoomInformation::STATUS_SEARCH_OCCUPANCY_UNSATISFIED => $moduleInstance->l('Occupancy exceeds room capacity', 'hotelreservationsystem'), ); + Hook::exec('actionAdminRoomStatusTitle', array('status' => &$status, 'id_status' => $idStatus)); + return isset($status[$idStatus]) ? $status[$idStatus] : ''; } diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php index dd4f7da37..0e3f55823 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php @@ -232,6 +232,12 @@ class HotelRoomTypeFeaturePricing extends ObjectModel $res &= $objFeaturePriceRestriction->deleteFeaturePriceRestrictionsById($existingFeaturePrices); } + Hook::exec('actionCustomFeaturePrice', array( + 'id_feature_price' => $idFeaturePrice, + 'restrictions' => $restrictions, + 'existing_feature_prices' => $existingFeaturePrices + )); + return $res; } diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php index 9bac1f873..700f32107 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php @@ -200,6 +200,12 @@ class RoomTypeServiceProduct extends ObjectModel $subCategory )) { $serviceProducts = Product::getProductsProperties($idLang, $serviceProducts); + + Hook::exec('actionRemoveNotAvailablePartyServices', array( + 'serviceProducts' => &$serviceProducts, + 'idProductRoomType' => $idProductRoomType + )); + foreach($serviceProducts as &$serviceProduct) { $serviceProduct['price_tax_exc'] = Product::getServiceProductPrice( (int)$serviceProduct['id_product'], diff --git a/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php b/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php index 25a1edfcb..21015ff2e 100644 --- a/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php +++ b/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php @@ -255,6 +255,14 @@ class ServiceProductCartDetail extends ObjectModel $numDays = 1; } + Hook::exec('actionCalculateDaysForServiceUnitPrice', array( + 'date_from' => $product['date_from'], + 'date_to' => $product['date_to'], + 'numdays' => &$numDays, + 'id_service_product' => (int) $product['id_product'], + 'id_cart' => $idCart + )); + $priceTaxIncl = Product::getServiceProductPrice( $objProduct->id, $product['id_product_option'], diff --git a/pdf/invoice.extra-demands-tab.tpl b/pdf/invoice.extra-demands-tab.tpl index cba5a8aed..fbf36f05c 100644 --- a/pdf/invoice.extra-demands-tab.tpl +++ b/pdf/invoice.extra-demands-tab.tpl @@ -97,6 +97,7 @@ {/if} {$service['name']} + {hook h='displayPartyServiceProductDatesInvoiceAndEmail' id_service_product_order_detail=$service['id_service_product_order_detail']} {if isset($service['product_tax_label']) && $service['product_tax_label']}{$service['product_tax_label']}{else}{l s='No tax' pdf='true'}{/if} diff --git a/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl b/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl index dba731425..d92fa02db 100644 --- a/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl +++ b/themes/hotel-reservation-theme/_partials/cart_booking_demands.tpl @@ -135,6 +135,7 @@
{$product['name']|escape:'html':'UTF-8'}
+ {hook h='displayCartExtraDemandsOrderOpc' id_service_product=$product['id_product'] id_cart_booking=$cartRoom['id']} {if $product.price_calculation_method == Product::PRICE_CALCULATION_METHOD_PER_DAY}
{if ($product.show_price && !isset($restricted_country_mode)) || isset($groups)}{if !$priceDisplay}{convertPrice price=$product.price_tax_incl}{else}{convertPrice price=$product.price_tax_exc}{/if}{/if}{l s='/night'} diff --git a/themes/hotel-reservation-theme/_partials/order-extra-services.tpl b/themes/hotel-reservation-theme/_partials/order-extra-services.tpl index 095cfc644..61d89e9f8 100644 --- a/themes/hotel-reservation-theme/_partials/order-extra-services.tpl +++ b/themes/hotel-reservation-theme/_partials/order-extra-services.tpl @@ -59,6 +59,7 @@ {l s='(Quantity: %s)' sprintf=[$additionalService['quantity']|string_format:'%02d']} {/if}
+ {hook h='displayOrderedPartyServiceProduct' id_service_product_order_detail=$additionalService['id_service_product_order_detail']}
diff --git a/themes/hotel-reservation-theme/_partials/order-room-detail.tpl b/themes/hotel-reservation-theme/_partials/order-room-detail.tpl index aaf47aa0c..50a89fca1 100644 --- a/themes/hotel-reservation-theme/_partials/order-room-detail.tpl +++ b/themes/hotel-reservation-theme/_partials/order-room-detail.tpl @@ -94,6 +94,7 @@
+ {hook h='displayOrderDetailAfterOccupancy' data=$data_v room=$rm_v id_order=$order->id}
diff --git a/themes/hotel-reservation-theme/_partials/room_type_list.tpl b/themes/hotel-reservation-theme/_partials/room_type_list.tpl index aaa0f3ec0..6ae40d73b 100644 --- a/themes/hotel-reservation-theme/_partials/room_type_list.tpl +++ b/themes/hotel-reservation-theme/_partials/room_type_list.tpl @@ -154,6 +154,7 @@
{l s='No room available for this hotel!'}
+ {hook h='displayAfterNoRoomAvailableBlock'} {/if} {block name='displayRoomTypeListAfter'} diff --git a/themes/hotel-reservation-theme/cms.tpl b/themes/hotel-reservation-theme/cms.tpl index 5e656370c..c5961ef3b 100644 --- a/themes/hotel-reservation-theme/cms.tpl +++ b/themes/hotel-reservation-theme/cms.tpl @@ -41,6 +41,7 @@
{$cms->content}
+ {hook h='displayCMSPage' page=$cms} {elseif isset($cms_category)}

{$cms_category->name|escape:'html':'UTF-8'}

diff --git a/themes/hotel-reservation-theme/contact-form.tpl b/themes/hotel-reservation-theme/contact-form.tpl index 210557e3b..1f4232e0d 100644 --- a/themes/hotel-reservation-theme/contact-form.tpl +++ b/themes/hotel-reservation-theme/contact-form.tpl @@ -190,6 +190,7 @@ + {hook h='displayAfterContactUsSubmitButton'}
{/block} diff --git a/themes/hotel-reservation-theme/order-confirmation.tpl b/themes/hotel-reservation-theme/order-confirmation.tpl index e8cc450cc..6b2c8437d 100644 --- a/themes/hotel-reservation-theme/order-confirmation.tpl +++ b/themes/hotel-reservation-theme/order-confirmation.tpl @@ -95,6 +95,7 @@ {$data_v['name']}

+ {hook h='displayOrderConfirmationRoomTypeNameAfter' id_product=$data_v['id_product']}
@@ -129,6 +130,7 @@ + {hook h='displayOrderConfirmationAfterOccupancy' data=$data_v room=$rm_v}
diff --git a/themes/hotel-reservation-theme/order-opc-new-account.tpl b/themes/hotel-reservation-theme/order-opc-new-account.tpl index bc2cdb501..1d8acf4eb 100644 --- a/themes/hotel-reservation-theme/order-opc-new-account.tpl +++ b/themes/hotel-reservation-theme/order-opc-new-account.tpl @@ -406,6 +406,7 @@
+ {hook h='displayAddAccountFormBottom'} {/block}
diff --git a/themes/hotel-reservation-theme/order-opc.tpl b/themes/hotel-reservation-theme/order-opc.tpl index 81115a208..ef4f92be6 100644 --- a/themes/hotel-reservation-theme/order-opc.tpl +++ b/themes/hotel-reservation-theme/order-opc.tpl @@ -177,6 +177,7 @@ {/if}
{/block} + {block name='displayCheckoutGuestDetailsAfter'}{hook h='displayCheckoutGuestDetailsAfter'}{/block} {* proceed only if no order restrict errors are there *} {if !$orderRestrictErr} From afe0c6d65dbe84fb29c8ffbff55a5937ff81e998 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Mon, 19 Oct 2026 18:41:07 +0530 Subject: [PATCH 3/6] Updated: hooks position updated --- .../template/controllers/orders/_product_line.tpl | 1 + .../controllers/orders/helpers/view/view.tpl | 2 +- .../template/helpers/list/list_content.tpl | 15 +++++++++++---- pdf/invoice.additinal-services-tab.tpl | 2 +- .../_partials/order-extra-services.tpl | 2 +- .../_partials/order-room-detail.tpl | 2 +- themes/hotel-reservation-theme/contact-form.tpl | 2 +- .../order-confirmation.tpl | 2 +- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/orders/_product_line.tpl b/admin-dev/themes/default/template/controllers/orders/_product_line.tpl index 9576af251..cc01b5317 100644 --- a/admin-dev/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_product_line.tpl @@ -62,6 +62,7 @@ {/if} + {hook h='displayAdminOrderOccupancyColumn' data=$data}

diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl index 4a5e53675..4c7765e5c 100644 --- a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -495,7 +495,6 @@ {if $customer->phone}

 {$customer->phone}
{/if} - {hook h='displayAdminOrderAfterPhone'}
@@ -519,6 +518,7 @@ {if $customer->phone}
 {$customer->phone}
{/if} + {hook h='displayAdminOrderAfterPhone'}
diff --git a/admin-dev/themes/default/template/helpers/list/list_content.tpl b/admin-dev/themes/default/template/helpers/list/list_content.tpl index 99f826656..807444c4b 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -158,19 +158,26 @@ {if $has_actions} {assign var='compiled_actions' value=array()} + {capture assign='row_actions_before_delete'}{hook h='displayAdminListRowActionsBeforeDelete' table=$table identifier=$identifier id=$tr.$identifier token=$token}{/capture} + {assign var='row_actions_before_delete_added' value=false} {foreach $actions AS $key => $action} {if isset($tr.$action)} {if $key == 0} {assign var='action' value=$action} {/if} - {if $action == 'delete' && $actions|@count > 2} - {$compiled_actions[] = 'divider'} + {if $action == 'delete'} + {if $row_actions_before_delete} + {$compiled_actions[] = $row_actions_before_delete} + {assign var='row_actions_before_delete_added' value=true} + {/if} + {if $actions|@count > 2} + {$compiled_actions[] = 'divider'} + {/if} {/if} {$compiled_actions[] = $tr.$action} {/if} {/foreach} - {capture assign='row_actions_before_delete'}{hook h='displayAdminListRowActionsBeforeDelete' table=$table identifier=$identifier id=$tr.$identifier token=$token}{/capture} - {if $row_actions_before_delete}{$compiled_actions[] = $row_actions_before_delete}{/if} + {if $row_actions_before_delete && !$row_actions_before_delete_added}{$compiled_actions[] = $row_actions_before_delete}{/if} {if $compiled_actions|count > 0} {if $compiled_actions|count > 1}
{/if}
diff --git a/pdf/invoice.additinal-services-tab.tpl b/pdf/invoice.additinal-services-tab.tpl index 5a37503cb..abe4b2d43 100644 --- a/pdf/invoice.additinal-services-tab.tpl +++ b/pdf/invoice.additinal-services-tab.tpl @@ -52,7 +52,7 @@ {/if} {$service['name']} - {hook h='displayPartyServiceProductDatesInvoiceAndEmail' id_service_product_order_detail=$service['id_service_product_order_detail']} + {hook h='displayServiceProductDatesInvoiceAndEmail' id_service_product_order_detail=$service['id_service_product_order_detail']} {if isset($service['product_tax_label']) && $service['product_tax_label']}{$service['product_tax_label']}{else}{l s='No tax' pdf='true'}{/if} diff --git a/themes/hotel-reservation-theme/_partials/order-extra-services.tpl b/themes/hotel-reservation-theme/_partials/order-extra-services.tpl index 2cdc79afd..9396d461b 100644 --- a/themes/hotel-reservation-theme/_partials/order-extra-services.tpl +++ b/themes/hotel-reservation-theme/_partials/order-extra-services.tpl @@ -68,7 +68,7 @@ {/capture} {include file='_partials/ui-tooltip.tpl' tooltip_content=$smarty.capture.htl_pcm_tooltip allow_html=true}
- {hook h='displayOrderedPartyServiceProduct' id_service_product_order_detail=$additionalService['id_service_product_order_detail']} + {hook h='displayOrderedServiceProduct' product_order_detail=$additionalService}
diff --git a/themes/hotel-reservation-theme/_partials/order-room-detail.tpl b/themes/hotel-reservation-theme/_partials/order-room-detail.tpl index 4a75bee19..d25ecde7c 100644 --- a/themes/hotel-reservation-theme/_partials/order-room-detail.tpl +++ b/themes/hotel-reservation-theme/_partials/order-room-detail.tpl @@ -90,10 +90,10 @@
{l s='Guests'}
{$rm_v.adults|string_format:'%02d'} {if $rm_v.adults > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if $rm_v.children}, {$rm_v.children|string_format:'%02d'} {if $rm_v.children > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} + {hook h='displayOrderDetailAfterOccupancy' data=$data_v room=$rm_v id_order=$order->id}
- {hook h='displayOrderDetailAfterOccupancy' data=$data_v room=$rm_v id_order=$order->id}
diff --git a/themes/hotel-reservation-theme/contact-form.tpl b/themes/hotel-reservation-theme/contact-form.tpl index c618cb905..d5a9b05e6 100644 --- a/themes/hotel-reservation-theme/contact-form.tpl +++ b/themes/hotel-reservation-theme/contact-form.tpl @@ -190,8 +190,8 @@ - {hook h='displayAfterContactUsSubmitButton'}
+ {hook h='displayAfterContactUsSubmitButton'} {/block} diff --git a/themes/hotel-reservation-theme/order-confirmation.tpl b/themes/hotel-reservation-theme/order-confirmation.tpl index 2dea17aa9..677ff93b1 100644 --- a/themes/hotel-reservation-theme/order-confirmation.tpl +++ b/themes/hotel-reservation-theme/order-confirmation.tpl @@ -127,10 +127,10 @@
{l s='Guests'}
{$rm_v.adults|string_format:'%02d'} {if $rm_v.adults > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if $rm_v.children}, {$rm_v.children|string_format:'%02d'} {if $rm_v.children > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} + {hook h='displayOrderConfirmationAfterOccupancy' data=$data_v room=$rm_v}
- {hook h='displayOrderConfirmationAfterOccupancy' data=$data_v room=$rm_v}
From 4fc5e239856247bb8d6a28018f37e9be7e4ab3d6 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Tue, 27 Oct 2026 16:25:05 +0530 Subject: [PATCH 4/6] updated : multiple hooks names updated --- .../controllers/orders/_current_cart_details_data.tpl | 4 ++-- .../themes/default/template/controllers/orders/form.tpl | 6 +++--- .../template/controllers/orders/helpers/view/view.tpl | 2 +- .../default/template/controllers/products/informations.tpl | 2 +- admin-dev/themes/default/template/helpers/kpi/row.tpl | 2 +- .../themes/default/template/helpers/list/list_content.tpl | 2 +- controllers/admin/AdminNormalProductsController.php | 2 +- controllers/admin/AdminOrdersController.php | 2 +- controllers/admin/AdminProductsController.php | 2 +- .../classes/HotelBranchInformation.php | 2 +- modules/hotelreservationsystem/classes/HotelHelper.php | 2 +- .../hotel-reservation-theme/_partials/order-room-detail.tpl | 2 +- themes/hotel-reservation-theme/_partials/room_type_list.tpl | 2 +- themes/hotel-reservation-theme/cms.tpl | 2 +- themes/hotel-reservation-theme/contact-form.tpl | 2 +- themes/hotel-reservation-theme/order-confirmation.tpl | 2 +- themes/hotel-reservation-theme/order-opc-new-account.tpl | 2 +- themes/hotel-reservation-theme/order-opc.tpl | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl b/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl index a9bd80c22..deaeda564 100644 --- a/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl @@ -121,7 +121,7 @@
- {hook h='displayAdminOrderCartRoomCellAfterOccupancy' data=$data} + {hook h='displayAdminOrderCartRoomOccupancyAfter' data=$data} {/if} @@ -154,7 +154,7 @@ - {hook h='displayAfterAdminCartDetailsDeleteAction' data=$data} + {hook h='displayAdminCartDetailsDeleteActionAfter' data=$data}
 {l s='Services'} diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl index 25d61c43c..18c66d79d 100644 --- a/admin-dev/themes/default/template/controllers/orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/form.tpl @@ -2316,7 +2316,7 @@ - {hook h="displayAdminBeforeOrderMessage"} + {hook h="displayAdminOrderMessageBefore"}
diff --git a/admin-dev/themes/default/template/controllers/products/informations.tpl b/admin-dev/themes/default/template/controllers/products/informations.tpl index 392d4893c..d0104b9fe 100644 --- a/admin-dev/themes/default/template/controllers/products/informations.tpl +++ b/admin-dev/themes/default/template/controllers/products/informations.tpl @@ -204,7 +204,7 @@ - {hook h='displayAddExtraProductInformation' item=$product} + {hook h='displayAdminProductInformationAfter' item=$product} diff --git a/admin-dev/themes/default/template/helpers/kpi/row.tpl b/admin-dev/themes/default/template/helpers/kpi/row.tpl index 53fe846b5..3a4635eb9 100644 --- a/admin-dev/themes/default/template/helpers/kpi/row.tpl +++ b/admin-dev/themes/default/template/helpers/kpi/row.tpl @@ -23,7 +23,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{hook h='displayBeforeKpi'} +{hook h='displayAdminKpiBefore'}
{foreach from=$kpis item=kpi} diff --git a/admin-dev/themes/default/template/helpers/list/list_content.tpl b/admin-dev/themes/default/template/helpers/list/list_content.tpl index 807444c4b..a1e846e6b 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -158,7 +158,7 @@ {if $has_actions} {assign var='compiled_actions' value=array()} - {capture assign='row_actions_before_delete'}{hook h='displayAdminListRowActionsBeforeDelete' table=$table identifier=$identifier id=$tr.$identifier token=$token}{/capture} + {capture assign='row_actions_before_delete'}{hook h='displayAdminListRowActionsDeleteBefore' table=$table identifier=$identifier id=$tr.$identifier token=$token}{/capture} {assign var='row_actions_before_delete_added' value=false} {foreach $actions AS $key => $action} {if isset($tr.$action)} diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index f3e0616b2..5680dd633 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -245,7 +245,7 @@ class AdminNormalProductsControllerCore extends AdminController // Code For Standard product working $this->_where .= ' AND a.`selling_preference_type` = '.(int)Product::SELLING_PREFERENCE_WITH_ROOM_TYPE; - Hook::exec('actionFilterAdminProducts', array('join' => &$this->_join, 'where' => &$this->_where)); + Hook::exec('actionAdminProductsQueryModifier', array('join' => &$this->_join, 'where' => &$this->_where)); $this->_group = 'GROUP BY a.`id_product`'; diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 04b7ca4a0..a28dafaee 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -9001,7 +9001,7 @@ class AdminOrdersControllerCore extends AdminController { $idHotelBookingDetail = (int) Tools::getValue('id_hotel_booking_detail'); if (Validate::isLoadedObject($objHotelBookingDetail = new HotelBookingDetail($idHotelBookingDetail))) { - Hook::exec('actionAdminOnChangeRoomStatus', array( + Hook::exec('actionAdminRoomStatusChangeAfter', array( 'post_data' => Tools::getAllValues(), 'errors' => &$this->errors )); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 13a0e50e3..28c922b64 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -152,7 +152,7 @@ class AdminProductsControllerCore extends AdminController } // Allow modules to override the labels of the product tabs - $tabNameOverrides = Hook::exec('displayUpdateProductTabName', array('id_product' => (int) Tools::getValue('id_product')), null, true); + $tabNameOverrides = Hook::exec('actionAdminProductTabNameModifier', array('id_product' => (int) Tools::getValue('id_product')), null, true); if (is_array($tabNameOverrides)) { foreach ($tabNameOverrides as $moduleOverrides) { if (is_array($moduleOverrides)) { diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index 88c79e5e9..cefbf1b93 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -505,7 +505,7 @@ class HotelBranchInformation extends ObjectModel LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbl ON (hbl.`id` = hbi.`id` AND hbl.`id_lang` = '.(int)$idLang.')'; - Hook::exec('actionFilterSellerHotel', array('query' => &$sql)); + Hook::exec('actionSellerHotelQueryModifier', array('query' => &$sql)); return Db::getInstance()->executeS($sql); } diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index 0e2057290..e3418e839 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -3343,7 +3343,7 @@ class HotelHelper INNER JOIN `'._DB_PREFIX_.'category` AS c ON (hbi.`id_category` = c.`id_category`) WHERE 1'; - Hook::exec('actionFilterSellerHotel', array('treeQuery' => &$sql)); + Hook::exec('actionSellerHotelQueryModifier', array('treeQuery' => &$sql)); if ($cities) { $sql .= ' AND c.`id_parent` IN ('.implode(', ', $cities).')'; diff --git a/themes/hotel-reservation-theme/_partials/order-room-detail.tpl b/themes/hotel-reservation-theme/_partials/order-room-detail.tpl index d25ecde7c..ea6d4facd 100644 --- a/themes/hotel-reservation-theme/_partials/order-room-detail.tpl +++ b/themes/hotel-reservation-theme/_partials/order-room-detail.tpl @@ -90,7 +90,7 @@
{l s='Guests'}
{$rm_v.adults|string_format:'%02d'} {if $rm_v.adults > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if $rm_v.children}, {$rm_v.children|string_format:'%02d'} {if $rm_v.children > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} - {hook h='displayOrderDetailAfterOccupancy' data=$data_v room=$rm_v id_order=$order->id} + {hook h='displayOrderDetailOccupancyAfter' data=$data_v room=$rm_v id_order=$order->id}
diff --git a/themes/hotel-reservation-theme/_partials/room_type_list.tpl b/themes/hotel-reservation-theme/_partials/room_type_list.tpl index 25af0288b..0e547755d 100644 --- a/themes/hotel-reservation-theme/_partials/room_type_list.tpl +++ b/themes/hotel-reservation-theme/_partials/room_type_list.tpl @@ -178,7 +178,7 @@
{l s='No room available for this property!'}
- {hook h='displayAfterNoRoomAvailableBlock'} + {hook h='displayNoRoomAvailableBlockAfter'} {/if} {block name='displayRoomTypeListAfter'} diff --git a/themes/hotel-reservation-theme/cms.tpl b/themes/hotel-reservation-theme/cms.tpl index c5961ef3b..12c497556 100644 --- a/themes/hotel-reservation-theme/cms.tpl +++ b/themes/hotel-reservation-theme/cms.tpl @@ -41,7 +41,7 @@
{$cms->content}
- {hook h='displayCMSPage' page=$cms} + {hook h='displayCMSPageContentAfter' page=$cms} {elseif isset($cms_category)}

{$cms_category->name|escape:'html':'UTF-8'}

diff --git a/themes/hotel-reservation-theme/contact-form.tpl b/themes/hotel-reservation-theme/contact-form.tpl index d5a9b05e6..ae6e29ace 100644 --- a/themes/hotel-reservation-theme/contact-form.tpl +++ b/themes/hotel-reservation-theme/contact-form.tpl @@ -191,7 +191,7 @@
- {hook h='displayAfterContactUsSubmitButton'} + {hook h='displayContactFormSubmitButtonAfter'} {/block} diff --git a/themes/hotel-reservation-theme/order-confirmation.tpl b/themes/hotel-reservation-theme/order-confirmation.tpl index 677ff93b1..9e68ecd77 100644 --- a/themes/hotel-reservation-theme/order-confirmation.tpl +++ b/themes/hotel-reservation-theme/order-confirmation.tpl @@ -127,7 +127,7 @@
{l s='Guests'}
{$rm_v.adults|string_format:'%02d'} {if $rm_v.adults > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if $rm_v.children}, {$rm_v.children|string_format:'%02d'} {if $rm_v.children > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if} - {hook h='displayOrderConfirmationAfterOccupancy' data=$data_v room=$rm_v} + {hook h='displayOrderConfirmationOccupancyAfter' data=$data_v room=$rm_v}
diff --git a/themes/hotel-reservation-theme/order-opc-new-account.tpl b/themes/hotel-reservation-theme/order-opc-new-account.tpl index ed9f9b6a7..30ee05ec7 100644 --- a/themes/hotel-reservation-theme/order-opc-new-account.tpl +++ b/themes/hotel-reservation-theme/order-opc-new-account.tpl @@ -419,7 +419,7 @@
- {hook h='displayAddAccountFormBottom'} + {hook h='displayCustomerAccountFormBottom'} {/block} diff --git a/themes/hotel-reservation-theme/order-opc.tpl b/themes/hotel-reservation-theme/order-opc.tpl index 210193f58..5cbb76425 100644 --- a/themes/hotel-reservation-theme/order-opc.tpl +++ b/themes/hotel-reservation-theme/order-opc.tpl @@ -177,7 +177,7 @@ {/if} {/block} - {block name='displayCheckoutGuestDetailsAfter'}{hook h='displayCheckoutGuestDetailsAfter'}{/block} + {hook h='displayCheckoutGuestDetailsAfter'} {* proceed only if no order restrict errors are there *} {if !$orderRestrictErr} From 1bf8ad601539d4dc35d4785cf0f450300de91a1a Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Tue, 27 Oct 2026 19:12:13 +0530 Subject: [PATCH 5/6] hook names updated --- .../orders/_current_cart_details_data.tpl | 2 +- .../controllers/orders/_product_line.tpl | 2 +- .../controllers/orders/helpers/view/view.tpl | 2 +- .../orders/modals/_edit_room_booking.tpl | 2 +- ..._services_service_products_tab_content.tpl | 11 +++++----- classes/Mail.php | 2 +- classes/Product.php | 22 +++++++++---------- .../admin/AdminNormalProductsController.php | 2 -- controllers/admin/AdminOrdersController.php | 5 ----- pdf/invoice.additinal-services-tab.tpl | 2 +- .../_partials/order-extra-services.tpl | 2 +- 11 files changed, 23 insertions(+), 31 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl b/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl index deaeda564..c2d410eae 100644 --- a/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_current_cart_details_data.tpl @@ -26,7 +26,7 @@
{l s='Cart Details'} - {hook h='displayAdminCartDetailsHeader'} + {hook h='displayAdminCartDetailsPanelTitleAfter'}
diff --git a/admin-dev/themes/default/template/controllers/orders/_product_line.tpl b/admin-dev/themes/default/template/controllers/orders/_product_line.tpl index cc01b5317..17cf1903f 100644 --- a/admin-dev/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_product_line.tpl @@ -62,7 +62,7 @@
{/if} - {hook h='displayAdminOrderOccupancyColumn' data=$data} + {hook h='displayAdminOrderProductLineOccupancyAfter' data=$data}

diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl index 73dee7830..dd43b560e 100644 --- a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -518,7 +518,7 @@ {if $customer->phone}

 {$customer->phone}
{/if} - {hook h='displayAdminOrderPhoneAfter'} + {hook h='displayAdminOrderCustomerPhoneAfter'}
diff --git a/admin-dev/themes/default/template/controllers/orders/modals/_edit_room_booking.tpl b/admin-dev/themes/default/template/controllers/orders/modals/_edit_room_booking.tpl index faed6f935..3e78a0787 100644 --- a/admin-dev/themes/default/template/controllers/orders/modals/_edit_room_booking.tpl +++ b/admin-dev/themes/default/template/controllers/orders/modals/_edit_room_booking.tpl @@ -29,7 +29,7 @@
  • {l s='Services'}
  • - {hook h='displayAdminOrderEditRoomTabNav' data=$data} + {hook h='displayAdminOrderEditRoomTab' data=$data}
    diff --git a/admin-dev/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl b/admin-dev/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl index c0d84da76..2196ec084 100644 --- a/admin-dev/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl +++ b/admin-dev/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl @@ -46,7 +46,7 @@ {l s='Total Price (tax excl.)'} {l s='Total Price (tax incl.)'} {l s='Action'} - {hook h="displayAdminOrderExtraServicesTabContentHeading"} + {hook h="displayAdminOrderSelectedServicesHeading"} @@ -106,7 +106,7 @@ {displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency} {displayPrice price=$service['total_price_tax_incl']|escape:'html':'UTF-8' currency=$orderCurrency} - {hook h="displayAdminOrderExtraServicesTabContentData" id_service_product=$service['id_product'] id_htl_booking_detail=$id_booking_detail id_service_product_order_detail=$service['id_service_product_order_detail'] room_type_id_product=$additionalServices['room_type_id_product']} + {hook h="displayAdminOrderSelectedServicesData" id_service_product=$service['id_product'] id_htl_booking_detail=$id_booking_detail id_service_product_order_detail=$service['id_service_product_order_detail'] room_type_id_product=$additionalServices['room_type_id_product']} {/foreach} {else} @@ -137,7 +137,7 @@ {l s='Quantity'} {l s='Unit Price (tax excl.)'} - {hook h="displayAdminOrderExtraServicesTabContentHeading"} + {hook h="displayAdminOrderAvailableServicesHeading"} @@ -186,7 +186,7 @@
    - {hook h="displayAdminOrderExtraServicesTabContentData" id_service_product=$product['id_product'] id_htl_booking_detail=$id_booking_detail} + {hook h="displayAdminOrderAvailableServicesData" id_service_product=$product['id_product'] id_htl_booking_detail=$id_booking_detail} {/foreach} @@ -317,7 +317,7 @@ {l s='Unit Price (tax excl.)'} {l s='Total Price (tax excl.)'} {l s='Total Price (tax incl.)'} - {hook h="displayAdminOrderExtraServicesTabContentHeading"} + {hook h="displayAdminOrderViewServicesHeading"} @@ -366,6 +366,7 @@ {displayPrice price=$service['total_price_tax_incl'] currency=$orderCurrency} + {hook h="displayAdminOrderViewServicesData" id_service_product=$service['id_product'] id_htl_booking_detail=$id_booking_detail id_service_product_order_detail=$service['id_service_product_order_detail'] room_type_id_product=$additionalServices['room_type_id_product']} {/foreach} diff --git a/classes/Mail.php b/classes/Mail.php index 28e2e9799..badf1153e 100644 --- a/classes/Mail.php +++ b/classes/Mail.php @@ -424,7 +424,7 @@ class MailCore extends ObjectModel Hook::exec('actionMailAlterMessageBeforeSend', array( 'template' => &$template, 'message' => &$email, - 'template_vars' => $template_vars, + 'template_vars' => &$template_vars, )); $mailer->send($email); diff --git a/classes/Product.php b/classes/Product.php index 56ab769d1..27f9704bd 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -3404,14 +3404,6 @@ class ProductCore extends ObjectModel } } - Hook::exec( - 'actionProductPriceModifier', - array( - 'price' => &$price, - 'type' => 'pre_tax' - ) - ); - // Tax $address->id_country = $id_country; $address->id_state = $id_state; @@ -3423,10 +3415,16 @@ class ProductCore extends ObjectModel $id_tax_rule_group = Product::getIdTaxRulesGroupByIdProduct((int)$id_product, $context); } - Hook::exec('actionProductTaxRuleGroupModifier', array( - 'id_product' => $id_product, - 'id_tax_rule_group' => &$id_tax_rule_group - )); + Hook::exec( + 'actionProductPriceModifier', + array( + 'price' => &$price, + 'type' => 'pre_tax', + 'id_product' => $id_product, + 'id_tax_rule_group' => &$id_tax_rule_group + + ) + ); $tax_manager = TaxManagerFactory::getManager($address, $id_tax_rule_group); $product_tax_calculator = $tax_manager->getTaxCalculator(); diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index 5680dd633..dbd347614 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -245,8 +245,6 @@ class AdminNormalProductsControllerCore extends AdminController // Code For Standard product working $this->_where .= ' AND a.`selling_preference_type` = '.(int)Product::SELLING_PREFERENCE_WITH_ROOM_TYPE; - Hook::exec('actionAdminProductsQueryModifier', array('join' => &$this->_join, 'where' => &$this->_where)); - $this->_group = 'GROUP BY a.`id_product`'; $this->fields_list = array(); diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index a28dafaee..bbed3db59 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -633,11 +633,6 @@ class AdminOrdersControllerCore extends AdminController unset($this->toolbar_btn['new']); } - Hook::exec('actionOrderDetailToolbarModifier', array( - 'toolbar_btn' => &$this->toolbar_btn, - 'id_order' => (int) Tools::getValue('id_order') - )); - return $res; } diff --git a/pdf/invoice.additinal-services-tab.tpl b/pdf/invoice.additinal-services-tab.tpl index abe4b2d43..e7a848bb2 100644 --- a/pdf/invoice.additinal-services-tab.tpl +++ b/pdf/invoice.additinal-services-tab.tpl @@ -52,7 +52,7 @@ {/if} {$service['name']} - {hook h='displayServiceProductDatesInvoiceAndEmail' id_service_product_order_detail=$service['id_service_product_order_detail']} + {hook h='displayInvoiceServiceProductNameAfter' id_service_product_order_detail=$service['id_service_product_order_detail']} {if isset($service['product_tax_label']) && $service['product_tax_label']}{$service['product_tax_label']}{else}{l s='No tax' pdf='true'}{/if} diff --git a/themes/hotel-reservation-theme/_partials/order-extra-services.tpl b/themes/hotel-reservation-theme/_partials/order-extra-services.tpl index 9396d461b..8d4bfe473 100644 --- a/themes/hotel-reservation-theme/_partials/order-extra-services.tpl +++ b/themes/hotel-reservation-theme/_partials/order-extra-services.tpl @@ -68,7 +68,7 @@ {/capture} {include file='_partials/ui-tooltip.tpl' tooltip_content=$smarty.capture.htl_pcm_tooltip allow_html=true} - {hook h='displayOrderedServiceProduct' product_order_detail=$additionalService} + {hook h='displayOrderDetailServiceProductNameBlockAfter' product_order_detail=$additionalService}
    From bb1982531342b44200adb4c6fcf4c3d91ce7a286 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Tue, 27 Oct 2026 19:54:12 +0530 Subject: [PATCH 6/6] hook names changed --- .../classes/HotelBookingDetail.php | 25 ------------------- .../classes/HotelBranchInformation.php | 2 -- .../classes/HotelHelper.php | 2 -- .../classes/HotelRoomTypeFeaturePricing.php | 2 +- .../classes/ServiceProductCartDetail.php | 10 +------- 5 files changed, 2 insertions(+), 39 deletions(-) diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 1b3899caf..da06f3240 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -839,18 +839,6 @@ class HotelBookingDetail extends ObjectModel $avai_rooms = Db::getInstance()->executeS($sql); - Hook::exec('actionAvailableRoomData', array( - 'avai_rooms' => &$avai_rooms, - 'unavailableRoomTypes' => &$unavailableRoomTypes, - 'params' => array( - 'id_hotel' => $idHotel, - 'id_product' => $idRoomType, - 'date_from' => $dateFrom, - 'date_to' => $dateTo, - 'all_params' => $allParams - ) - )); - if ($avai_rooms) { $availableRoomTypes = array( 'roomTypes' => array(), @@ -1393,19 +1381,6 @@ class HotelBookingDetail extends ObjectModel // free space unset($roomTypeDetail); - Hook::exec('actionPartiallyAvailableRoomData', array( - 'dateWiseRoomTypes' => &$dateWiseRoomTypes, - 'dateWiseCartRooms' => &$dateWiseCartRooms, - 'unavailableRoomTypes' => &$unavailableRoomTypes, - 'params' => array( - 'id_hotel' => $idHotel, - 'id_product' => $idRoomType, - 'date_from' => $dateFrom, - 'date_to' => $dateTo, - 'all_params' => $allParams - ) - )); - // Return room type wise instead of date wise foreach ($dateWiseRoomTypes as $timeStamp => $dateWiseDetail) { foreach ($dateWiseDetail['roomTypes'] as $idProduct => $roomTypeDetail) { diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index cefbf1b93..5d33d64a9 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -505,8 +505,6 @@ class HotelBranchInformation extends ObjectModel LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbl ON (hbl.`id` = hbi.`id` AND hbl.`id_lang` = '.(int)$idLang.')'; - Hook::exec('actionSellerHotelQueryModifier', array('query' => &$sql)); - return Db::getInstance()->executeS($sql); } diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index e3418e839..b247b7dce 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -3343,8 +3343,6 @@ class HotelHelper INNER JOIN `'._DB_PREFIX_.'category` AS c ON (hbi.`id_category` = c.`id_category`) WHERE 1'; - Hook::exec('actionSellerHotelQueryModifier', array('treeQuery' => &$sql)); - if ($cities) { $sql .= ' AND c.`id_parent` IN ('.implode(', ', $cities).')'; } diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php index 32a6dccd4..d068ec0b6 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeFeaturePricing.php @@ -232,7 +232,7 @@ class HotelRoomTypeFeaturePricing extends ObjectModel $res &= $objFeaturePriceRestriction->deleteFeaturePriceRestrictionsById($existingFeaturePrices); } - Hook::exec('actionCustomFeaturePrice', array( + Hook::exec('actionFeaturePriceRestrictionsSaveAfter', array( 'id_feature_price' => $idFeaturePrice, 'restrictions' => $restrictions, 'existing_feature_prices' => $existingFeaturePrices diff --git a/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php b/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php index d3cdc745d..5930a7e37 100644 --- a/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php +++ b/modules/hotelreservationsystem/classes/ServiceProductCartDetail.php @@ -288,14 +288,6 @@ class ServiceProductCartDetail extends ObjectModel $product['date_to'] ); - Hook::exec('actionCalculateDaysForServiceUnitPrice', array( - 'date_from' => $product['date_from'], - 'date_to' => $product['date_to'], - 'numdays' => &$numDays, - 'id_service_product' => (int) $product['id_product'], - 'id_cart' => $idCart - )); - $priceTaxIncl = Product::getServiceProductPrice( $objProduct->id, $product['id_product_option'], @@ -311,7 +303,7 @@ class ServiceProductCartDetail extends ObjectModel null, $product['htl_cart_booking_id'] ) / max($numDays, 1); - + $priceTaxExcl = Product::getServiceProductPrice( $objProduct->id, $product['id_product_option'],