- {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.'}
{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}
{l s='404 Not Found = Do not redirect and display a 404 page.'}
- {l s='301 Moved Permanently = Permanently display another stay type instead.'}
- {l s='302 Moved Temporarily = Temporarily display another stay type instead.'}
+ {l s='301 Moved Permanently = Permanently display another room type instead.'}
+ {l s='302 Moved Temporarily = Temporarily display another room type instead.'}
{l s='Please note that position numbering starts from 0. A position of 0 means stay type will be displayed at the topmost position.'}
+
{l s='Please note that position numbering starts from 0. A position of 0 means room type will be displayed at the topmost position.'}
- {l s='You can manage positions of the stay types of this hotel from'}
+ {l s='You can manage positions of the room types of this hotel from'}
{l s='here.'}
{l s='Set 1 day for setting no limit on Minimum length of stay'}
{l s='Set 0 day for setting no limit on Maximum length of stay'}
{l s='Enable "Length of stay for date ranges" for setting values of \"Minimum length of stay\" and \"Maximum length of stay\" according to different date ranges'}
-
{l s='Length of stays (minimum|maximum) of all the dates which does not fall under the date ranges of \"Length of stay for date ranges\", will be taken from the global values of length of stays of this stay type.'}
+
{l s='Length of stays (minimum|maximum) of all the dates which does not fall under the date ranges of \"Length of stay for date ranges\", will be taken from the global values of length of stays of this room type.'}
{l s='\"Date to\" will not be included in the date range of \"Length of stay for date ranges\".'}
- {l s='Below, enter the base occupancy of this stay type.'}
-
{l s='Note'}: {l s='Minimum 1 adult is madatory in the base occupancy of the stay type'}
+ {l s='Below, enter the base occupancy of this room type.'}
+
{l s='Note'}: {l s='Minimum 1 adult is madatory in the base occupancy of the room type'}
@@ -58,15 +58,15 @@
- {l s='Below, enter the maximum number of adults and children which can be accommodated in a stay of this stay type.'}
+ {l s='Below, enter the maximum number of adults and children which can be accommodated in a stay of this room type.'}
- {l s='For maximum stay occupancy, the total number of guests which can be accommodated in a stay of this stay type.'}
+ {l s='For maximum stay occupancy, the total number of guests which can be accommodated in a stay of this room type.'}
{l s='The sum of wholesale prices of the stay types in the pack is %s%s%s' sprintf=[$currency->prefix,{toolsConvertPrice price=$pack->noPackWholesalePrice($product->id)|string_format:$priceDisplayPrecisionFormat},$currency->suffix]}
{l s='The sum of wholesale prices of the room types in the pack is %s%s%s' sprintf=[$currency->prefix,{toolsConvertPrice price=$pack->noPackWholesalePrice($product->id)|string_format:$priceDisplayPrecisionFormat},$currency->suffix]}
{l s='The sum of prices of the stay types in the pack is %s%s%s' sprintf=[$currency->prefix,{toolsConvertPrice price=$pack->noPackPrice($product->id)|string_format:$priceDisplayPrecisionFormat},$currency->suffix]}
{l s='The sum of prices of the room types in the pack is %s%s%s' sprintf=[$currency->prefix,{toolsConvertPrice price=$pack->noPackPrice($product->id)|string_format:$priceDisplayPrecisionFormat},$currency->suffix]}
{/if}
{* As no use in QloApps currently so commented *}
{*
- {l s='If final price of the stay type is less than advance payment amount for the customer then customer will pay the final(lesser) price of the stay type.'}
+ {l s='If final price of the room type is less than advance payment amount for the customer then customer will pay the final(lesser) price of the room type.'}
diff --git a/classes/Product.php b/classes/Product.php
index bf7601ba5..45fe97535 100644
--- a/classes/Product.php
+++ b/classes/Product.php
@@ -6891,7 +6891,7 @@ class ProductCore extends ObjectModel
$objProduct = new self($idProduct);
if (Validate::isLoadedObject($objProduct)) {
$bookingType = $objProduct->booking_method;
- if ($bookingType !== null && $bookingType != HotelBookingDetail::PS_ROOM_UNIT_SELECTION_TYPE_DEFAULT) {
+ if ($bookingType !== null && $bookingType != 0) {
$result = (int) $bookingType;
if ($fallbackType === null) {
Cache::store($cache_key, $result);
diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php
index 41fa82c4f..654933669 100644
--- a/controllers/admin/AdminCartRulesController.php
+++ b/controllers/admin/AdminCartRulesController.php
@@ -250,8 +250,8 @@ class AdminCartRulesControllerCore extends AdminController
Media::addJsDef(
array(
'admin_cart_rule_tab_link' => $this->context->link->getAdminLink('AdminCartRules'),
- 'room_access_err' => $this->l('You can only select stay types which hotel(s) access is provided to this employee.'),
- 'room_rmv_txt' => $this->l('Unselect below stay types'),
+ 'room_access_err' => $this->l('You can only select room types which hotel(s) access is provided to this employee.'),
+ 'room_rmv_txt' => $this->l('Unselect below room types'),
)
);
$this->addJS(_PS_JS_DIR_.'admin/cart-rules.js');
diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php
index b70983792..d56f2da21 100644
--- a/controllers/admin/AdminCustomerThreadsController.php
+++ b/controllers/admin/AdminCustomerThreadsController.php
@@ -1004,7 +1004,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
if (Validate::isLoadedObject($product)) {
if ($product->booking_product) {
- $content .= $this->l('Stay type:');
+ $content .= $this->l('Room type:');
} else {
$content .= $this->l('Product:');
}
diff --git a/controllers/admin/AdminDashboardController.php b/controllers/admin/AdminDashboardController.php
index 1fc4a45ae..3571b7960 100644
--- a/controllers/admin/AdminDashboardController.php
+++ b/controllers/admin/AdminDashboardController.php
@@ -251,7 +251,7 @@ class AdminDashboardControllerCore extends AdminController
$objHotelInfo = new HotelBranchInformation();
$idsHotel = $objHotelInfo->getProfileAccessedHotels($this->context->employee->id_profile, 1, 1);
- $hotelOptions = array(array('id_hotel' => false, 'hotel_name' => $this->l('All Hotels')));
+ $hotelOptions = array(array('id_hotel' => false, 'hotel_name' => $this->l('All Properties')));
foreach ($idsHotel as $idHotel) {
$objHotelBranchInfo = new HotelBranchInformation($idHotel, $this->context->language->id);
$hotelAddressInfo = HotelBranchInformation::getAddress($idHotel);
diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php
index 44deaf3c3..9298fa147 100644
--- a/controllers/admin/AdminImagesController.php
+++ b/controllers/admin/AdminImagesController.php
@@ -70,7 +70,7 @@ class AdminImagesControllerCore extends AdminController
'suffix' => ' px'
),
'products' => array(
- 'title' => $this->l('Stay Types/Products'),
+ 'title' => $this->l('Room Types/Products'),
'align' => 'center',
'type' => 'bool',
'active' => 'products',
@@ -260,7 +260,7 @@ class AdminImagesControllerCore extends AdminController
),
array(
'type' => 'switch',
- 'label' => $this->l('Stay Types/Products'),
+ 'label' => $this->l('Room Types/Products'),
'name' => 'products',
'required' => false,
'is_bool' => true,
@@ -502,7 +502,7 @@ class AdminImagesControllerCore extends AdminController
{
$types = array(
'categories' => $this->l('Categories'),
- 'products' => $this->l('Stay Types/Products'),
+ 'products' => $this->l('Room Types/Products'),
'hotels' => $this->l('Hotels'),
// 'manufacturers' => $this->l('Manufacturers'),
// 'suppliers' => $this->l('Suppliers'),
diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php
index 4739a0965..fec2fd096 100644
--- a/controllers/admin/AdminImportController.php
+++ b/controllers/admin/AdminImportController.php
@@ -79,7 +79,7 @@ class AdminImportControllerCore extends AdminController
$this->bootstrap = true;
$this->entities = array(
$this->l('Hotels'),
- $this->l('Stay Types'),
+ $this->l('Room Types'),
$this->l('Stays'),
$this->l('Categories'),
$this->l('Service Products'),
@@ -157,7 +157,7 @@ class AdminImportControllerCore extends AdminController
),
);
break;
- case $this->entities[$this->l('Stay Types')]:
+ case $this->entities[$this->l('Room Types')]:
$this->required_fields = array('id_hotel', 'name');
self::$validators['image'] = array('AdminImportController', 'split');
@@ -175,7 +175,7 @@ class AdminImportControllerCore extends AdminController
'id_tax_rules_group' => array('label' => $this->l('Tax rule ID')),
'advance_payment' => array('label' => $this->l('Allow advance payment(0 = Yes, 1 = No)')),
'payment_type' => array(
- 'label' => $this->l('Stay type advance payment (0/1/2)'),
+ 'label' => $this->l('Room type advance payment (0/1/2)'),
'help' => $this->l('0 = use global, 1 = Percentage, 2 = Fixed amount')
),
'payment_value' => array(
@@ -231,7 +231,7 @@ class AdminImportControllerCore extends AdminController
'no' => array('label' => $this->l('Ignore this column')),
'room_num' => array('label' => $this->l('Stay No *'),),
'floor' => array('label' => $this->l('Floor')),
- 'id_product' => array('label' => $this->l('Stay Type ID *')),
+ 'id_product' => array('label' => $this->l('Room Type ID *')),
'id_status' => array(
'label' => $this->l('Stay status (1/2/3)'),
'help' => $this->l('1 = Active, 2 = Inactive, 3 = Temporarily Inactive')),
@@ -251,7 +251,7 @@ class AdminImportControllerCore extends AdminController
'active' => array('label' => $this->l('Active (0/1)')),
'name' => array('label' => $this->l('Name *')),
'category' => array('label' => $this->l('Categories (x,y,z...)')),
- 'id_room_types' => array('label' => $this->l('Associated stay types (x,y,z...) *')),
+ 'id_room_types' => array('label' => $this->l('Associated room types (x,y,z...) *')),
'price' => array('label' => $this->l('Pre-tax retail price')),
'wholesale_price' => array('label' => $this->l('Pre-tax operating cost')),
'id_tax_rules_group' => array('label' => $this->l('Tax rule ID')),
@@ -2492,7 +2492,7 @@ class AdminImportControllerCore extends AdminController
}
}
} else {
- $this->warnings[] = $this->l('Invalid stay type Id: ').$info['id_product'];
+ $this->warnings[] = $this->l('Invalid room type Id: ').$info['id_product'];
}
}
}
@@ -3317,7 +3317,7 @@ class AdminImportControllerCore extends AdminController
Tools::deleteDirectory($hotelImages, false);
$prodImages = $objHotelReservation->getLocalPath().'views/img/prod_imgs/';
Tools::deleteDirectory($prodImages, false);
- case $this->entities[$this->l('Stay Types')]:
+ case $this->entities[$this->l('Room Types')]:
$images = Db::getInstance()->executeS('SELECT id_image FROM `'._DB_PREFIX_.'image` img
LEFT JOIN `'._DB_PREFIX_.'product` p ON p.id_product = img.id_product
WHERE p.booking_product=1');
@@ -3498,7 +3498,7 @@ class AdminImportControllerCore extends AdminController
$this->hotelImport();
$this->clearSmartyCache();
break;
- case $this->entities[$import_type = $this->l('Stay Types')]:
+ case $this->entities[$import_type = $this->l('Room Types')]:
$this->roomTypeImport();
$this->clearSmartyCache();
break;
diff --git a/controllers/admin/AdminInvoicesController.php b/controllers/admin/AdminInvoicesController.php
index 53da8ab2f..fd2603916 100644
--- a/controllers/admin/AdminInvoicesController.php
+++ b/controllers/admin/AdminInvoicesController.php
@@ -50,7 +50,7 @@ class AdminInvoicesControllerCore extends AdminController
'type' => 'bool'
),
'PS_PDF_IMG_INVOICE' => array(
- 'title' => $this->l('Enable stay type image'),
+ 'title' => $this->l('Enable room type image'),
'hint' => $this->l('Adds an image before product name on the invoice'),
'validation' => 'isBool',
'cast' => 'intval',
diff --git a/controllers/admin/AdminOrderPreferencesController.php b/controllers/admin/AdminOrderPreferencesController.php
index 4ddb6ce95..d3000dea1 100644
--- a/controllers/admin/AdminOrderPreferencesController.php
+++ b/controllers/admin/AdminOrderPreferencesController.php
@@ -221,8 +221,8 @@ class AdminOrderPreferencesControllerCore extends AdminController
),
'PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING' => array(
'title' => $this->l('Allow to add all services in a booking'),
- 'hint' => $this->l('Enable to allow all services created to be added in a booking while adding or editing a booking. Disable to allow only attached services with stay type.'),
- 'desc' => $this->l('If disabled, only attached services with stay type will be available to be added to a booking.'),
+ 'hint' => $this->l('Enable to allow all services created to be added in a booking while adding or editing a booking. Disable to allow only attached services with room type.'),
+ 'desc' => $this->l('If disabled, only attached services with room type will be available to be added to a booking.'),
'cast' => 'intval',
'type' => 'bool'
),
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index 8b1ff5a65..a3a7bc838 100644
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -165,7 +165,7 @@ class AdminOrdersControllerCore extends AdminController
'visible_default' => true
),
'room_type_name' => array(
- 'title' => $this->l('Stay type'),
+ 'title' => $this->l('Room type'),
'type' => 'select',
'filter_key' => 'hbd!id_product',
'list' => $this->roomTypesArray,
@@ -1442,7 +1442,7 @@ class AdminOrdersControllerCore extends AdminController
'title' => $this->l('Phone')
),
'room_types' => array(
- 'title' => $this->l('Stay Types')
+ 'title' => $this->l('Room Types')
),
'rooms' => array(
'title' => $this->l('Stays')
@@ -1539,7 +1539,7 @@ class AdminOrdersControllerCore extends AdminController
} elseif (!in_array($idRoomToReallocate, array_column($availableRooms, 'id_room'))) {
$this->errors[] = $this->l('Selected stay is not available for reallocation.');
} elseif (!Validate::isFloat($priceDiff)) {
- $this->errors[] = $this->l('Invalid price difference of the stay types.');
+ $this->errors[] = $this->l('Invalid price difference of the room types.');
}
} else {
$this->errors[] = $this->l('Selected stay is not available for reallocation.');
@@ -3231,7 +3231,7 @@ class AdminOrdersControllerCore extends AdminController
// if the current stock requires a warning
// if ($product['current_stock'] <= 0 && $display_out_of_stock_warning) {
- // $this->displayWarning($this->l('This booked stay type is not found: ').' '.$product['product_name']);
+ // $this->displayWarning($this->l('This booked room type is not found: ').' '.$product['product_name']);
// }
if ($product['id_warehouse'] != 0) {
$warehouse = new Warehouse((int)$product['id_warehouse']);
@@ -8789,7 +8789,7 @@ class AdminOrdersControllerCore extends AdminController
$result['error'] = $this->l('Invalid booking information. Please try again.');
}
} else {
- $result['error'] = $this->l('Selected stay type not found. Please try again.');
+ $result['error'] = $this->l('Selected room type not found. Please try again.');
}
$this->ajaxDie(json_encode($result));
diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php
index c756d252c..14bc25cfd 100644
--- a/controllers/admin/AdminPPreferencesController.php
+++ b/controllers/admin/AdminPPreferencesController.php
@@ -172,7 +172,7 @@ class AdminPPreferencesControllerCore extends AdminController
'type' => 'select',
'list' => array(
array('id' => HotelBookingDetail::SEARCH_EXACT_ROOM_TYPE_ALGO, 'name' => $this->l('Show room types satisfying required occupancy')),
- array('id' => HotelBookingDetail::SEARCH_ALL_ROOM_TYPE_ALGO, 'name' => $this->l('Show all available stay types'))
+ array('id' => HotelBookingDetail::SEARCH_ALL_ROOM_TYPE_ALGO, 'name' => $this->l('Show all available room types'))
),
'identifier' => 'id',
'desc' => $this->l('This option is only for fully available stays. For partially available stay, always all possible rooms will be displayed.'),
diff --git a/controllers/admin/AdminPreferencesController.php b/controllers/admin/AdminPreferencesController.php
index 4aa089803..a97ec7b54 100644
--- a/controllers/admin/AdminPreferencesController.php
+++ b/controllers/admin/AdminPreferencesController.php
@@ -187,7 +187,7 @@ class AdminPreferencesControllerCore extends AdminController
),
'PS_SHORT_DESC_LIMIT' => array(
'title' => $this->l('Short description Max Size'),
- 'hint' => $this->l('Set the maximum size of stay type, services and hotel short description (in characters).'),
+ 'hint' => $this->l('Set the maximum size of room type, services and hotel short description (in characters).'),
'validation' => 'isUnsignedInt',
'cast' => 'intval',
'type' => 'text',
diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php
index 5fa7dc4b3..ce48b8773 100644
--- a/controllers/admin/AdminProductsController.php
+++ b/controllers/admin/AdminProductsController.php
@@ -2387,11 +2387,11 @@ class AdminProductsControllerCore extends AdminController
// Categories
if ($this->isProductFieldUpdated('id_category_default') && (!Tools::isSubmit('categoryBox') || !count(Tools::getValue('categoryBox')))) {
- $this->errors[] = $this->l('This stay type must be in at least one category.');
+ $this->errors[] = $this->l('This room type must be in at least one category.');
}
if ($this->isProductFieldUpdated('id_category_default') && (!is_array(Tools::getValue('categoryBox')) || !in_array(Tools::getValue('id_category_default'), Tools::getValue('categoryBox')))) {
- $this->errors[] = $this->l('This stay type must be in the default category.');
+ $this->errors[] = $this->l('This room type must be in the default category.');
}
// Tags
@@ -2532,7 +2532,7 @@ class AdminProductsControllerCore extends AdminController
} else {
if (($object = $this->loadObject(true)) && $object->isAssociatedToShop()) {
if (!$object->booking_product) {
- $this->errors[] = $this->l('Stay type not found.');
+ $this->errors[] = $this->l('Room type not found.');
return;
}
}
@@ -2661,17 +2661,17 @@ class AdminProductsControllerCore extends AdminController
}
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=best_selling_room_type';
- $helper->tooltip = sprintf($this->l('Displays the best selling stay type based on the sales in the last %s day(s).', null, null, false), $nbDaysBestSelling);
+ $helper->tooltip = sprintf($this->l('Displays the best selling room type based on the sales in the last %s day(s).', null, null, false), $nbDaysBestSelling);
$this->kpis[] = $helper;
$helper = new HelperKpi();
$helper->id = 'box-disbled-room-types';
$helper->icon = 'icon-ban';
$helper->color = 'color2';
- $helper->title = $this->l('Disabled Stay Types', null, null, false);
+ $helper->title = $this->l('Disabled Room Types', null, null, false);
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=disabled_room_types';
$helper->href = Context::getContext()->link->getAdminLink('AdminProducts').'&submitResetproduct&submitFilterproduct=1&productFilter_sa!active=0&submitFilterproduct=1';
- $helper->tooltip = $this->l('The total number of stay types that are currently disabled.', null, null, false);
+ $helper->tooltip = $this->l('The total number of room types that are currently disabled.', null, null, false);
$this->kpis[] = $helper;
return parent::renderKpis();
@@ -2684,7 +2684,7 @@ class AdminProductsControllerCore extends AdminController
$this->addRowAction('duplicate');
$this->addRowAction('delete');
- $this->tpl_list_vars['title'] = $this->l('Stay Types');
+ $this->tpl_list_vars['title'] = $this->l('Room Types');
$this->_new_list_header_design = true;
@@ -2762,7 +2762,7 @@ class AdminProductsControllerCore extends AdminController
protected function _displayDraftWarning($active)
{
$content = '
- '.$this->l('Your stay type will be saved as a draft.').'
+ '.$this->l('Your room type will be saved as a draft.').' '.$this->l('Save and preview').'
';
@@ -2774,8 +2774,8 @@ class AdminProductsControllerCore extends AdminController
if (empty($this->display)) {
$this->page_header_toolbar_btn['new_product'] = array(
'href' => self::$currentIndex.'&addproduct&token='.$this->token,
- // 'desc' => $this->l('Add new stay type', null, null, false),
- 'desc' => $this->l('Add new stay type', null, null, false),
+ // 'desc' => $this->l('Add new room type', null, null, false),
+ 'desc' => $this->l('Add new room type', null, null, false),
'icon' => 'process-icon-new'
);
}
@@ -2808,7 +2808,7 @@ class AdminProductsControllerCore extends AdminController
$this->page_header_toolbar_btn['stats'] = array(
'short' => $this->l('Statistics', null, null, false),
'href' => $this->context->link->getAdminLink('AdminStats').'&module=statsproduct&id_product='.(int)$product->id,
- 'desc' => $this->l('Stay Type Sales', null, null, false),
+ 'desc' => $this->l('Room Type Sales', null, null, false),
);
}
@@ -2817,9 +2817,9 @@ class AdminProductsControllerCore extends AdminController
$this->page_header_toolbar_btn['delete'] = array(
'short' => $this->l('Delete', null, null, false),
'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&deleteproduct',
- 'desc' => $this->l('Delete this stay type', null, null, false),
+ 'desc' => $this->l('Delete this room type', null, null, false),
'confirm' => 1,
- 'js' => 'if (confirm(\''.$this->l('Delete stay type?', null, true, false).'\')){return true;}else{event.preventDefault();}'
+ 'js' => 'if (confirm(\''.$this->l('Delete room type?', null, true, false).'\')){return true;}else{event.preventDefault();}'
);
}
}
@@ -2927,8 +2927,8 @@ class AdminProductsControllerCore extends AdminController
// add text for normal product and booking product
$this->tpl_form_vars['booking_product_text'] = array(
- 'name'=> $this->l('Stay Type'),
- 'name_title'=> $this->l('Write the name of the Stay Type for ex. Delux, Executive etc. Invalid characters <>;=#{}')
+ 'name'=> $this->l('Room Type'),
+ 'name_title'=> $this->l('Write the name of the Room Type for ex. Delux, Executive etc. Invalid characters <>;=#{}')
);
$this->tpl_form_vars['normal_product_text'] = array(
'name'=> $this->l('Name'),
@@ -3106,13 +3106,13 @@ class AdminProductsControllerCore extends AdminController
)
);
} else {
- $this->displayWarning($this->l('Add Hotel Before configurate this stay type.'));
+ $this->displayWarning($this->l('Add Hotel Before configurate this room type.'));
}
} else {
- $this->displayWarning($this->l('You must save the stay type in this shop before managing hotel configuration.'));
+ $this->displayWarning($this->l('You must save the room type in this shop before managing hotel configuration.'));
}
} else {
- $this->displayWarning($this->l('You must save this stay type before managing stays.'));
+ $this->displayWarning($this->l('You must save this room type before managing stays.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -3245,7 +3245,7 @@ class AdminProductsControllerCore extends AdminController
));
}
} else {
- $this->displayWarning($this->l('You must save this stay type before managing Service Products.'));
+ $this->displayWarning($this->l('You must save this room type before managing Service Products.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -3355,7 +3355,7 @@ class AdminProductsControllerCore extends AdminController
}
}
} else {
- $this->errors[] = $this->l('Please save stay type details before saving service products.');
+ $this->errors[] = $this->l('Please save room type details before saving service products.');
}
}
@@ -3374,13 +3374,13 @@ class AdminProductsControllerCore extends AdminController
$smartyVars['roomTypeInfo'] = $roomTypeInfo;
}
} else {
- $this->displayWarning($this->l('Add Hotel Before configurate this stay type.'));
+ $this->displayWarning($this->l('Add Hotel Before configurate this room type.'));
}
} else {
- $this->displayWarning($this->l('You must save the stay type in this shop before managing occupancy.'));
+ $this->displayWarning($this->l('You must save the room type in this shop before managing occupancy.'));
}
} else {
- $this->displayWarning($this->l('You must save this stay type before managing occupancy.'));
+ $this->displayWarning($this->l('You must save this room type before managing occupancy.'));
}
$smartyVars['currency'] = $this->context->currency;
$data->assign($smartyVars);
@@ -3471,16 +3471,16 @@ class AdminProductsControllerCore extends AdminController
$roomTypeInfo['restrictionDataRange'] = $objRoomTypeRestrictionDates->getRoomTypeLengthOfStayRestriction($product->id);
$smartyVars['roomTypeInfo'] = $roomTypeInfo;
} else {
- $this->displayWarning($this->l('No hotel is attached to this stay type.'));
+ $this->displayWarning($this->l('No hotel is attached to this room type.'));
}
} else {
- $this->displayWarning($this->l('Stay type information is missing.'));
+ $this->displayWarning($this->l('Room type information is missing.'));
}
} else {
- $this->displayWarning($this->l('You must save stay type before managing length of stay.'));
+ $this->displayWarning($this->l('You must save room type before managing length of stay.'));
}
} else {
- $this->displayWarning($this->l('You must save stay type before managing length of stay.'));
+ $this->displayWarning($this->l('You must save room type before managing length of stay.'));
}
$smartyVars['product'] = $product;
@@ -3771,7 +3771,7 @@ class AdminProductsControllerCore extends AdminController
'idDefaultcurrency' => $objCurrency->id,
));
} else {
- $this->displayWarning($this->l('You must save this stay type before managing additional facilities.'));
+ $this->displayWarning($this->l('You must save this room type before managing additional facilities.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -3947,7 +3947,7 @@ class AdminProductsControllerCore extends AdminController
'is_shop_context' => Shop::getContext() == Shop::CONTEXT_SHOP
));
} else {
- $this->displayWarning($this->l('You must save this stay type before updating associations.'));
+ $this->displayWarning($this->l('You must save this room type before updating associations.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -4008,7 +4008,7 @@ class AdminProductsControllerCore extends AdminController
// get hotel address for this room type
$address_infos = Address::getCountryAndState(Cart::getIdAddressForTaxCalculation($obj->id));
} else {
- $this->displayWarning($this->l('You must save this stay type before adding specific pricing'));
+ $this->displayWarning($this->l('You must save this room type before adding specific pricing'));
$product->id_tax_rules_group = (int)Product::getIdTaxRulesGroupMostUsed();
$data->assign('ecotax_tax_excl', 0);
}
@@ -4768,10 +4768,10 @@ class AdminProductsControllerCore extends AdminController
$data->assign('imageType', ImageType::getFormatedName('small'));
}
} else {
- $this->displayWarning($this->l('You must save the stay type in this shop before adding images.'));
+ $this->displayWarning($this->l('You must save the room type in this shop before adding images.'));
}
} else {
- $this->displayWarning($this->l('You must save this stay type before adding images.'));
+ $this->displayWarning($this->l('You must save this room type before adding images.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -4832,10 +4832,10 @@ class AdminProductsControllerCore extends AdminController
$data->assign('link', $this->context->link);
$data->assign('default_form_language', $this->default_form_language);
} else {
- $this->displayWarning($this->l('You must save the stay type in this shop before adding features.'));
+ $this->displayWarning($this->l('You must save the room type in this shop before adding features.'));
}
} else {
- $this->displayWarning($this->l('You must save this stay type before adding features.'));
+ $this->displayWarning($this->l('You must save this room type before adding features.'));
}
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -4913,8 +4913,8 @@ class AdminProductsControllerCore extends AdminController
&& ($product->pack_stock_type == 2 || $product->pack_stock_type == 1 ||
($product->pack_stock_type == 3 && (Configuration::get('PS_PACK_STOCK_TYPE') == 1 || Configuration::get('PS_PACK_STOCK_TYPE') == 2))))) {
die(json_encode(array('error' => $this->l('You cannot use advanced stock management for this pack because').' '.
- $this->l('- advanced stock management is not enabled for these stay types').' '.
- $this->l('- you have chosen to decrement stay types quantities.'))));
+ $this->l('- advanced stock management is not enabled for these room types').' '.
+ $this->l('- you have chosen to decrement room types quantities.'))));
}
StockAvailable::setProductDependsOnStock($product->id, (int)Tools::getValue('value'));
@@ -4932,7 +4932,7 @@ class AdminProductsControllerCore extends AdminController
if ($product->depends_on_stock && !Pack::allUsesAdvancedStockManagement($product->id) && ((int)$value == 1
|| (int)$value == 2 || ((int)$value == 3 && (Configuration::get('PS_PACK_STOCK_TYPE') == 1 || Configuration::get('PS_PACK_STOCK_TYPE') == 2)))) {
die(json_encode(array('error' => $this->l('You cannot use this stock management option because:').' '.
- $this->l('- advanced stock management is not enabled for these stay types').' '.
+ $this->l('- advanced stock management is not enabled for these room types').' '.
$this->l('- advanced stock management is enabled for the pack'))));
}
@@ -4955,7 +4955,7 @@ class AdminProductsControllerCore extends AdminController
die(json_encode(array('error' => $this->l('Undefined value'))));
}
if (Tools::getValue('id_product_attribute') === false) {
- die(json_encode(array('error' => $this->l('Undefined id stay type attribute'))));
+ die(json_encode(array('error' => $this->l('Undefined id room type attribute'))));
}
StockAvailable::setQuantity($product->id, (int)Tools::getValue('id_product_attribute'), (int)Tools::getValue('value'));
@@ -5031,7 +5031,7 @@ class AdminProductsControllerCore extends AdminController
'Consider changing the default category.' => $this->l('Consider changing the default category.'),
'ID' => $this->l('ID'),
'Name' => $this->l('Name'),
- 'Mark all checkbox(es) of categories in which stay type is to appear' => $this->l('Mark the checkbox of each categories in which this stay type will appear.')
+ 'Mark all checkbox(es) of categories in which room type is to appear' => $this->l('Mark the checkbox of each categories in which this room type will appear.')
);
return $trad[$key];
}
@@ -5039,7 +5039,7 @@ class AdminProductsControllerCore extends AdminController
protected function _displayUnavailableProductWarning()
{
$content = '
- '.$this->l('Your stay type will be saved as a draft.').'
+ '.$this->l('Your room type will be saved as a draft.').' '.$this->l('Save and preview').'
';
diff --git a/controllers/admin/AdminRoomTypeSellingObjectsController.php b/controllers/admin/AdminRoomTypeSellingObjectsController.php
index 63809768d..724fdafb2 100644
--- a/controllers/admin/AdminRoomTypeSellingObjectsController.php
+++ b/controllers/admin/AdminRoomTypeSellingObjectsController.php
@@ -31,7 +31,7 @@ class AdminRoomTypeSellingObjectsController extends AdminController
$this->identifier = 'id_room_type_selling_object';
$this->lang = true;
$this->context = Context::getContext();
- $this->toolbar_title = $this->l('Stay Type Selling Objects');
+ $this->toolbar_title = $this->l('Room Type Selling Objects');
parent::__construct();
@@ -86,7 +86,7 @@ class AdminRoomTypeSellingObjectsController extends AdminController
$this->fields_form = array(
'legend' => array(
- 'title' => $this->l('Stay Type Selling Object'),
+ 'title' => $this->l('Room Type Selling Object'),
'icon' => 'icon-tags',
),
'input' => array(
@@ -96,13 +96,14 @@ class AdminRoomTypeSellingObjectsController extends AdminController
'name' => 'name',
'lang' => true,
'required' => true,
- 'hint' => $this->l('Displayed name for this stay type selling object.'),
+ 'hint' => $this->l('Displayed name for this room type selling object.'),
),
array(
'type' => 'switch',
- 'label' => $this->l('Status'),
+ 'label' => $this->l('Enabled'),
'name' => 'active',
'is_bool' => true,
+ 'default_value' => 1,
'values' => array(
array(
'id' => 'active_on',
@@ -124,4 +125,38 @@ class AdminRoomTypeSellingObjectsController extends AdminController
return parent::renderForm();
}
+
+ public function postProcess()
+ {
+ if (Tools::isSubmit('submitAdd'.$this->table)) {
+ $languages = Language::getLanguages(false);
+ $defaultLangId = Configuration::get('PS_LANG_DEFAULT');
+ $objDefaultLanguage = Language::getLanguage((int) $defaultLangId);
+ $idSellingObject = Tools::getValue($this->identifier);
+
+ if (!trim(Tools::getValue('name_'.$defaultLangId))) {
+ $this->errors[] = $this->l('Name is required at least in ').$objDefaultLanguage['name'];
+ } else {
+ foreach ($languages as $lang) {
+ if (trim(Tools::getValue('name_'.$lang['id_lang']))) {
+ if (!Validate::isGenericName(Tools::getValue('name_'.$lang['id_lang']))) {
+ $this->errors[] = $this->l('Invalid Name in ').$lang['name'];
+ }
+ }
+ }
+ }
+
+ if ($idSellingObject) {
+ $this->display = 'edit';
+ } else {
+ $this->display = 'add';
+ }
+
+ if (!$this->errors) {
+ parent::postProcess();
+ }
+ } else {
+ parent::postProcess();
+ }
+ }
}
diff --git a/mails/en/booking_extra_demands.tpl b/mails/en/booking_extra_demands.tpl
index cc89a656e..a4551d61f 100644
--- a/mails/en/booking_extra_demands.tpl
+++ b/mails/en/booking_extra_demands.tpl
@@ -5,7 +5,7 @@