From 748811250cff47ac9654cea22928b65585f714d3 Mon Sep 17 00:00:00 2001 From: Amit sharma Date: Wed, 20 May 2026 12:33:53 +0530 Subject: [PATCH] remove extra const from product class and hotel booking detail class, add validation --- .../controllers/cart_rules/actions.tpl | 8 +- .../controllers/cart_rules/conditions.tpl | 4 +- .../controllers/cart_rules/product_rule.tpl | 2 +- .../cart_rules/product_rule_group.tpl | 6 +- .../controllers/carts/helpers/view/view.tpl | 2 +- .../customer_threads/helpers/view/message.tpl | 2 +- .../customers/helpers/view/view.tpl | 6 +- .../controllers/import/helpers/form/form.tpl | 2 +- .../normal_products/associations.tpl | 4 +- .../controllers/normal_products/features.tpl | 4 +- .../normal_products/informations.tpl | 22 ++--- .../controllers/normal_products/prices.tpl | 2 +- .../controllers/normal_products/seo.tpl | 4 +- .../orders/_current_cart_details_data.tpl | 4 +- .../controllers/orders/_overbookings.tpl | 2 +- .../orders/_resolvable_overbookings.tpl | 2 +- .../orders/_rooms_informaion_table.tpl | 2 +- .../orders/helpers/list/list_header.tpl | 2 +- .../controllers/orders/helpers/view/view.tpl | 4 +- .../_add_order_extra_services_tab_content.tpl | 2 +- .../orders/modals/_add_room_booking.tpl | 4 +- .../orders/modals/_cancel_room_bookings.tpl | 2 +- ..._services_service_products_tab_content.tpl | 2 +- .../orders/modals/_room_reallocation.tpl | 6 +- .../products/additionalfacilities.tpl | 2 +- .../controllers/products/associations.tpl | 2 +- .../controllers/products/features.tpl | 4 +- .../products/helpers/form/form.tpl | 2 +- .../template/controllers/products/images.tpl | 2 +- .../controllers/products/informations.tpl | 50 ++++++------ .../controllers/products/lengthofstay.tpl | 4 +- .../products/modal-duplicate-options.tpl | 4 +- .../controllers/products/occupancy.tpl | 14 ++-- .../template/controllers/products/prices.tpl | 22 ++--- .../template/controllers/products/seo.tpl | 4 +- .../controllers/products/serviceproduct.tpl | 2 +- .../controllers/search/helpers/view/view.tpl | 4 +- admin/themes/default/template/search_form.tpl | 2 +- classes/Product.php | 2 +- .../admin/AdminCartRulesController.php | 4 +- .../admin/AdminCustomerThreadsController.php | 2 +- .../admin/AdminDashboardController.php | 2 +- controllers/admin/AdminImagesController.php | 6 +- controllers/admin/AdminImportController.php | 16 ++-- controllers/admin/AdminInvoicesController.php | 2 +- .../admin/AdminOrderPreferencesController.php | 4 +- controllers/admin/AdminOrdersController.php | 10 +-- .../admin/AdminPPreferencesController.php | 2 +- .../admin/AdminPreferencesController.php | 2 +- controllers/admin/AdminProductsController.php | 80 +++++++++---------- .../AdminRoomTypeSellingObjectsController.php | 43 +++++++++- mails/en/booking_extra_demands.tpl | 4 +- mails/en/booking_extra_demands.txt | 2 +- mails/en/booking_extra_demands_text.tpl | 4 +- .../bookings_refund_request_detail_admin.tpl | 2 +- ...kings_refund_request_detail_admin_text.tpl | 2 +- ...ookings_refund_request_detail_customer.tpl | 2 +- ...gs_refund_request_detail_customer_text.tpl | 2 +- mails/en/order_refund_completed_admin.txt | 2 +- mails/en/order_refund_completed_customer.txt | 2 +- mails/en/order_refund_denied_admin.txt | 2 +- mails/en/order_refund_denied_customer.txt | 2 +- mails/en/order_refund_pending_admin.txt | 2 +- mails/en/order_refund_pending_customer.txt | 2 +- modules/blockcart/blockcart.tpl | 2 +- modules/dashguestcycle/dashguestcycle.php | 18 ++--- modules/dashinsights/dashinsights.php | 34 ++++---- .../templates/hook/dashboard-zone-two.tpl | 2 +- .../templates/hook/dashboard_zone_two.tpl | 4 +- .../classes/HotelBookingDetail.php | 2 - .../AdminHotelPropertyTypesController.php | 37 ++++++++- .../AdminHotelRoomsBookingController.php | 26 +++--- .../helpers/view/_partials/booking-cart.tpl | 2 +- .../helpers/view/view.tpl | 2 +- modules/statscheckup/statscheckup.php | 2 +- modules/statsproduct/statsproduct.php | 4 +- .../AdminHotelRoomModuleSettingController.php | 2 +- .../views/templates/hook/searchForm.tpl | 2 +- .../wkroomsearchblock/wkroomsearchblock.php | 8 +- pdf/invoice.extra-demands-tab.tpl | 4 +- pdf/order-slip.product-tab.tpl | 2 +- .../_partials/room_type_list.tpl | 2 +- .../modules/blockcart/blockcart.tpl | 2 +- .../hotel-reservation-theme/order-detail.tpl | 6 +- .../hotel-reservation-theme/order-return.tpl | 2 +- themes/hotel-reservation-theme/product.tpl | 4 +- 86 files changed, 330 insertions(+), 262 deletions(-) diff --git a/admin/themes/default/template/controllers/cart_rules/actions.tpl b/admin/themes/default/template/controllers/cart_rules/actions.tpl index 40ac64b72..d7da999e3 100644 --- a/admin/themes/default/template/controllers/cart_rules/actions.tpl +++ b/admin/themes/default/template/controllers/cart_rules/actions.tpl @@ -85,26 +85,26 @@

- +
diff --git a/admin/themes/default/template/controllers/cart_rules/conditions.tpl b/admin/themes/default/template/controllers/cart_rules/conditions.tpl index 59ec231b8..8f225fbbf 100644 --- a/admin/themes/default/template/controllers/cart_rules/conditions.tpl +++ b/admin/themes/default/template/controllers/cart_rules/conditions.tpl @@ -255,7 +255,7 @@

diff --git a/admin/themes/default/template/controllers/cart_rules/product_rule.tpl b/admin/themes/default/template/controllers/cart_rules/product_rule.tpl index 3e0214739..10afca5a0 100644 --- a/admin/themes/default/template/controllers/cart_rules/product_rule.tpl +++ b/admin/themes/default/template/controllers/cart_rules/product_rule.tpl @@ -3,7 +3,7 @@ {* Everything is on a single line in order to avoid a empty space between the [ ] and the word *} - [{if $product_rule_type == 'products'}{l s='Stay types:'}{elseif $product_rule_type == 'categories'}{l s='Categories:'}{elseif $product_rule_type == 'manufacturers'}{l s='Manufacturers:'}{elseif $product_rule_type == 'suppliers'}{l s='Suppliers'}{elseif $product_rule_type == 'attributes'}{l s='Attributes'}{/if}] + [{if $product_rule_type == 'products'}{l s='Room types:'}{elseif $product_rule_type == 'categories'}{l s='Categories:'}{elseif $product_rule_type == 'manufacturers'}{l s='Manufacturers:'}{elseif $product_rule_type == 'suppliers'}{l s='Suppliers'}{elseif $product_rule_type == 'attributes'}{l s='Attributes'}{/if}] diff --git a/admin/themes/default/template/controllers/cart_rules/product_rule_group.tpl b/admin/themes/default/template/controllers/cart_rules/product_rule_group.tpl index 6977cff00..fded1812c 100644 --- a/admin/themes/default/template/controllers/cart_rules/product_rule_group.tpl +++ b/admin/themes/default/template/controllers/cart_rules/product_rule_group.tpl @@ -14,7 +14,7 @@
- +
@@ -26,7 +26,7 @@
-

{l s='Assign features to this stay type'}

+

{l s='Assign features to this room type'}

- {l s='You can specify a value for each relevant feature regarding this stay type. Empty fields will not be displayed.'}
+ {l s='You can specify a value for each relevant feature regarding this room type. Empty fields will not be displayed.'}
{l s='You can either create a specific value, or select among the existing pre-defined values you\'ve previously added.'}
diff --git a/admin/themes/default/template/controllers/normal_products/informations.tpl b/admin/themes/default/template/controllers/normal_products/informations.tpl index 870e8e26c..1a008c063 100644 --- a/admin/themes/default/template/controllers/normal_products/informations.tpl +++ b/admin/themes/default/template/controllers/normal_products/informations.tpl @@ -30,8 +30,8 @@

{l s='Information'}

{if isset($display_common_field) && $display_common_field} -
{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this stay type' sprintf=$bullet_common_field}
+
{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this room type' sprintf=$bullet_common_field}
{/if} {include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"} @@ -103,7 +103,7 @@
{include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"}
@@ -155,7 +155,7 @@