From 09c883a7fe3027feb7b9d36fb4f06009467df3ac Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Fri, 28 Jun 2024 17:00:30 +0530 Subject: [PATCH 1/2] Updated: Prepration time to minimum booking offset and its defination in the admin order preferences controller --- controllers/admin/AdminOrderPreferencesController.php | 8 ++++---- .../classes/HotelBranchInformation.php | 4 ++-- .../controllers/admin/AdminAddHotelController.php | 4 ++-- .../views/templates/admin/add_hotel/helpers/form/form.tpl | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/controllers/admin/AdminOrderPreferencesController.php b/controllers/admin/AdminOrderPreferencesController.php index 4068a6f09..4125603b6 100644 --- a/controllers/admin/AdminOrderPreferencesController.php +++ b/controllers/admin/AdminOrderPreferencesController.php @@ -95,8 +95,8 @@ class AdminOrderPreferencesControllerCore extends AdminController 'class' => 'fixed-width-xxl readonly', ), 'GLOBAL_PREPARATION_TIME' => array( - 'title' => $this->l('Preparation time'), - 'hint' => $this->l('Number of days required to prepare a room for a guest\'s stay. For example, if you set this value to 3 and someone is booking on 2nd of March he can only book rooms for dates from and after 3 days, i.e, 5th of March.'), + 'title' => $this->l('Minimum booking offset'), + 'hint' => $this->l('The minimum booking offset refers to the furthest future date from which a guest can book a room relative to their desired check-in date. For example, if you set this value to 3 and someone is booking on 2nd of March he can only book rooms for dates from and after 3 days, i.e, 5th of March.'), 'desc' => $this->l('Set to 0 to disable this feature.'), 'type' => 'text', 'class' => 'fixed-width-xl', @@ -342,9 +342,9 @@ class AdminOrderPreferencesControllerCore extends AdminController } if ($globalPreparationTime === '') { - $this->errors[] = Tools::displayError('Field \'Preparation time\' can not be empty.'); + $this->errors[] = Tools::displayError('Field \'Minimum booking offset\' can not be empty.'); } elseif ($globalPreparationTime !== '0' && !Validate::isUnsignedInt($globalPreparationTime)) { - $this->errors[] = Tools::displayError('Field \'Preparation time\' is invalid.'); + $this->errors[] = Tools::displayError('Field \'Minimum booking offset\' is invalid.'); } } diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index 05af3c72b..9463c8cd0 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -1228,13 +1228,13 @@ class HotelBranchInformation extends ObjectModel if (!$this->use_global_preparation_time) { if ($this->preparation_time === '') { - $message = Tools::displayError('Preparation time is a required.'); + $message = Tools::displayError('Minimum booking offset is a required.'); if ($die) { throw new PrestaShopException($message); } return $error_return ? $message : false; } elseif ($this->preparation_time !== '0' && !Validate::isUnsignedInt($this->preparation_time)) { - $message = Tools::displayError('Preparation time is invalid.'); + $message = Tools::displayError('Minimum booking offset is invalid.'); if ($die) { throw new PrestaShopException($message); } diff --git a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php index 1d0e738b3..4998ad868 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php @@ -343,9 +343,9 @@ class AdminAddHotelController extends ModuleAdminController if (!$enableUseGlobalPreparationTime) { if ($preparationTime === '') { - $this->errors[] = $this->l('Preparation time is a required field.'); + $this->errors[] = $this->l('Minimum booking offset is a required field.'); } elseif ($preparationTime !== '0' && !Validate::isUnsignedInt($preparationTime)) { - $this->errors[] = $this->l('Preparation time is invalid.'); + $this->errors[] = $this->l('Minimum booking offset is invalid.'); } } } diff --git a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl index 4ef90c7d8..2321054af 100644 --- a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl @@ -367,7 +367,7 @@
@@ -380,7 +380,7 @@