diff --git a/admin/themes/default/template/controllers/normal_products/prices.tpl b/admin/themes/default/template/controllers/normal_products/prices.tpl
index be8a69b43..9b91f7206 100644
--- a/admin/themes/default/template/controllers/normal_products/prices.tpl
+++ b/admin/themes/default/template/controllers/normal_products/prices.tpl
@@ -203,9 +203,9 @@ $(document).ready(function () {
{if isset($pack) && $pack->isPack($product->id)}
{l s='The sum of prices of the products in the pack is %s%s%s' sprintf=[$currency->prefix,{toolsConvertPrice price=$pack->noPackPrice($product->id)|string_format:$priceDisplayPrecisionFormat},$currency->suffix]}
{/if}
- {displayPrice price={$demand['price']|escape:'html':'UTF-8'} currency=$module->id_currency}
+ {displayPrice price={$demand['price']|escape:'html':'UTF-8'} currency=$idDefaultcurrency}
diff --git a/admin/themes/default/template/controllers/products/serviceproduct.tpl b/admin/themes/default/template/controllers/products/serviceproduct.tpl
index 5baab2136..668c5e0d6 100644
--- a/admin/themes/default/template/controllers/products/serviceproduct.tpl
+++ b/admin/themes/default/template/controllers/products/serviceproduct.tpl
@@ -15,7 +15,7 @@
{l s='name'}
- {l s='Category'}
+ {l s='Auto add to cart'}
{l s='Position'}
@@ -45,19 +45,19 @@
- {if isset($service_product.custom_price) && $service_product.custom_price}{displayPrice price=$service_product.custom_price currency=$id_currency}{else}{displayPrice price=$service_product.default_price currency=$id_currency}{/if}
+ {if isset($service_product.custom_price) && $service_product.custom_price}{displayPrice price=$service_product.custom_price currency=$currency->id}{else}{displayPrice price=$service_product.default_price currency=$currency->id}{/if}
- {l s='Default price: %s' sprintf={displayPrice price=$service_product.default_price currency=$id_currency}}
+
{l s='Default price: %s' sprintf={displayPrice price=$service_product.default_price currency=$currency->id}}
{if isset($service_product.tax_rules_group_name) && $service_product.tax_rules_group_name}{$service_product.tax_rules_group_name}{else}{$service_product.default_tax_rules_group_name}{/if}
-
+
{l s='No Tax'}
{foreach from=$tax_rules_groups item=tax_rules_group}
@@ -71,7 +71,7 @@
- {l s='save'}
+ {l s='save'}
diff --git a/classes/DateRange.php b/classes/DateRange.php
index 13108ad60..075d212b7 100644
--- a/classes/DateRange.php
+++ b/classes/DateRange.php
@@ -47,7 +47,10 @@ class DateRangeCore extends ObjectModel
SELECT `id_date_range`, `time_end`
FROM `'._DB_PREFIX_.'date_range`
WHERE `time_end` = (SELECT MAX(`time_end`) FROM `'._DB_PREFIX_.'date_range`)');
- if (!$result['id_date_range'] || strtotime($result['time_end']) < strtotime(date('Y-m-d H:i:s'))) {
+ if (!$result
+ || !$result['id_date_range']
+ || strtotime($result['time_end']) < strtotime(date('Y-m-d H:i:s'))
+ ) {
// The default range is set to 1 day less 1 second (in seconds)
$rangeSize = 86399;
$dateRange = new DateRange();
diff --git a/classes/Tools.php b/classes/Tools.php
index 8212ec4b0..f71f8c4a4 100644
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -957,7 +957,7 @@ class ToolsCore
* @param string $string Error message
* @param bool $htmlentities By default at true for parsing error message with htmlentities
*/
- public static function displayError($string = 'Fatal error', $htmlentities = true, Context $context = null)
+ public static function displayError($string = 'Fatal error', $htmlentities = true, Context $context = null, $addslashes = false)
{
global $_ERRORS;
@@ -975,6 +975,9 @@ class ToolsCore
}
$key = md5(str_replace('\'', '\\\'', $string));
$str = (isset($_ERRORS) && is_array($_ERRORS) && array_key_exists($key, $_ERRORS)) ? $_ERRORS[$key] : $string;
+ if ($addslashes) {
+ $str = addslashes($str);
+ }
return $htmlentities ? Tools::htmlentitiesUTF8(stripslashes($str)) : $str;
}
diff --git a/classes/Translate.php b/classes/Translate.php
index 810fcf0f3..c2c8ccd08 100644
--- a/classes/Translate.php
+++ b/classes/Translate.php
@@ -126,7 +126,7 @@ class TranslateCore
* @param string $source
* @return string
*/
- public static function getModuleTranslation($module, $string, $source, $sprintf = null, $js = false, $language = null)
+ public static function getModuleTranslation($module, $string, $source, $sprintf = null, $addslashes = false, $language = null)
{
global $_MODULES, $_MODULE, $_LANGADM;
@@ -171,7 +171,7 @@ class TranslateCore
$string = preg_replace("/\\\*'/", "\'", $string);
$key = md5($string);
- $cache_key = $name.'|'.$string.'|'.$source.'|'.(int)$js;
+ $cache_key = $name.'|'.$string.'|'.$source.'|'.(int)$addslashes;
if (!isset($lang_cache[$cache_key])) {
if ($_MODULES == null) {
@@ -210,10 +210,10 @@ class TranslateCore
$ret = Translate::checkAndReplaceArgs($ret, $sprintf);
}
- if ($js) {
+
+ $ret = htmlspecialchars($ret, ENT_COMPAT, 'UTF-8');
+ if ($addslashes) {
$ret = addslashes($ret);
- } else {
- $ret = htmlspecialchars($ret, ENT_COMPAT, 'UTF-8');
}
if ($sprintf === null) {
diff --git a/classes/Validate.php b/classes/Validate.php
index 3446c5238..63dcacc75 100644
--- a/classes/Validate.php
+++ b/classes/Validate.php
@@ -706,6 +706,46 @@ class ValidateCore
return $id === null || Validate::isUnsignedId($id);
}
+ public static function isOccupancy($occupancy)
+ {
+ if (is_array($occupancy)) {
+ if (count(array_filter(array_keys($occupancy), 'is_string'))) {
+ $occupancy = array($occupancy);
+ }
+ $response = true;
+ foreach ($occupancy as $key => $roomOccupancy) {
+ if (is_array($roomOccupancy)) {
+ if (!isset($roomOccupancy['adults']) || !$roomOccupancy['adults'] || !Validate::isUnsignedInt($roomOccupancy['adults'])) {
+ $response = $response && false;
+ }
+ if (isset($roomOccupancy['children'])) {
+ if (!Validate::isUnsignedInt($roomOccupancy['children'])) {
+ $response = $response && false;
+ }
+ if ($roomOccupancy['children'] > 0) {
+ if (!isset($roomOccupancy['child_ages']) || ($roomOccupancy['children'] != count($roomOccupancy['child_ages'])) || !is_array($roomOccupancy['child_ages'])) {
+ $response = $response && false;
+ } else {
+ if (is_array($roomOccupancy['child_ages'])) {
+ foreach($roomOccupancy['child_ages'] as $childAge) {
+ if (!Validate::isUnsignedInt($childAge)) {
+ $response = $response && false;
+ }
+ }
+ }
+ }
+ }
+ }
+ $response = $response && true;
+ } else {
+ $response = $response && false;
+ }
+ }
+ return $response;
+ }
+ return false;
+ }
+
/**
* Check object validity
*
diff --git a/classes/checkoutProcess/AbstractCheckoutStep.php b/classes/checkoutProcess/AbstractCheckoutStep.php
index 185e131dc..9904e5d36 100644
--- a/classes/checkoutProcess/AbstractCheckoutStep.php
+++ b/classes/checkoutProcess/AbstractCheckoutStep.php
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/
-abstract class AbstractCheckoutStep implements CheckoutStepInterface
+abstract class AbstractCheckoutStepCore implements CheckoutStepInterface
{
public $step_is_reachable = 0;
public $step_is_complete = 0;
diff --git a/classes/checkoutProcess/CheckoutCartSummaryStep.php b/classes/checkoutProcess/CheckoutCartSummaryStep.php
index 6b9b9b389..634922ff2 100644
--- a/classes/checkoutProcess/CheckoutCartSummaryStep.php
+++ b/classes/checkoutProcess/CheckoutCartSummaryStep.php
@@ -18,7 +18,7 @@
* @license https://store.webkul.com/license.html
*/
-class CheckoutCartSummaryStep extends AbstractCheckoutStep
+class CheckoutCartSummaryStepCore extends AbstractCheckoutStepCore
{
public function __construct()
{
diff --git a/classes/checkoutProcess/CheckoutCustomerDetailsStep.php b/classes/checkoutProcess/CheckoutCustomerDetailsStep.php
index 7ec1fef59..b8933ae06 100644
--- a/classes/checkoutProcess/CheckoutCustomerDetailsStep.php
+++ b/classes/checkoutProcess/CheckoutCustomerDetailsStep.php
@@ -18,7 +18,7 @@
* @license https://store.webkul.com/license.html
*/
-class CheckoutCustomerDetailsStep extends AbstractCheckoutStep
+class CheckoutCustomerDetailsStepCore extends AbstractCheckoutStepCore
{
public function __construct()
{
diff --git a/classes/checkoutProcess/CheckoutPaymentStep.php b/classes/checkoutProcess/CheckoutPaymentStep.php
index 504d762f6..b55f3e8fc 100644
--- a/classes/checkoutProcess/CheckoutPaymentStep.php
+++ b/classes/checkoutProcess/CheckoutPaymentStep.php
@@ -18,7 +18,7 @@
* @license https://store.webkul.com/license.html
*/
-class CheckoutPaymentStep extends AbstractCheckoutStep
+class CheckoutPaymentStepCore extends AbstractCheckoutStepCore
{
public function __construct() {
parent::__construct();
diff --git a/classes/checkoutProcess/CheckoutProcess.php b/classes/checkoutProcess/CheckoutProcess.php
index 0944d3d44..f1d6d30e3 100644
--- a/classes/checkoutProcess/CheckoutProcess.php
+++ b/classes/checkoutProcess/CheckoutProcess.php
@@ -18,7 +18,7 @@
* @license https://store.webkul.com/license.html
*/
-class CheckoutProcess
+class CheckoutProcessCore
{
public $steps = array();
diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php
index cd64e7e99..ea3a469f7 100644
--- a/classes/controller/AdminController.php
+++ b/classes/controller/AdminController.php
@@ -1628,14 +1628,6 @@ class AdminControllerCore extends Controller
$this->context->smarty->assign('help_link', 'http://help.prestashop.com/'.Language::getIsoById($this->context->employee->id_lang).'/doc/'
.Tools::getValue('controller').'?version='._PS_VERSION_.'&country='.Language::getIsoById($this->context->employee->id_lang));
-
- $this->context->smarty->assign(array(
- 'show_page_header_toolbar' => $this->show_page_header_toolbar,
- 'page_header_toolbar_title' => $this->page_header_toolbar_title,
- 'title' => $this->page_header_toolbar_title,
- 'toolbar_btn' => $this->page_header_toolbar_btn,
- 'page_header_toolbar_btn' => $this->page_header_toolbar_btn,
- ));
}
/**
@@ -2138,11 +2130,9 @@ class AdminControllerCore extends Controller
$this->initPageHeaderToolbar();
if ($this->display == 'edit' || $this->display == 'add') {
- if (!$this->loadObject(true)) {
- return;
+ if ($this->loadObject(true)) {
+ $this->content .= $this->renderForm();
}
-
- $this->content .= $this->renderForm();
} elseif ($this->display == 'view') {
// Some controllers use the view action without an object
if ($this->className) {
@@ -2168,6 +2158,11 @@ class AdminControllerCore extends Controller
'content' => $this->content,
'lite_display' => $this->lite_display,
'url_post' => self::$currentIndex.'&token='.$this->token,
+ 'show_page_header_toolbar' => $this->show_page_header_toolbar,
+ 'page_header_toolbar_title' => $this->page_header_toolbar_title,
+ 'title' => $this->page_header_toolbar_title,
+ 'toolbar_btn' => $this->page_header_toolbar_btn,
+ 'page_header_toolbar_btn' => $this->page_header_toolbar_btn,
));
}
diff --git a/classes/module/Module.php b/classes/module/Module.php
index 5a0a591a6..04c4a2cbe 100644
--- a/classes/module/Module.php
+++ b/classes/module/Module.php
@@ -2124,13 +2124,13 @@ abstract class ModuleCore
* @param bool|string $specific filename to use in translation key
* @return string Translation
*/
- public function l($string, $specific = false)
+ public function l($string, $specific = false, $addslashes = false)
{
if (self::$_generate_config_xml_mode) {
return $string;
}
- return Translate::getModuleTranslation($this, $string, ($specific) ? $specific : $this->name);
+ return Translate::getModuleTranslation($this, $string, ($specific) ? $specific : $this->name, null, $addslashes);
}
/*
diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php
index bc157bf1f..300367e9f 100644
--- a/classes/pdf/HTMLTemplateInvoice.php
+++ b/classes/pdf/HTMLTemplateInvoice.php
@@ -358,7 +358,6 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$rm_dtl = $obj_rm_type->getRoomTypeInfoByIdProduct($type_value['product_id']);
$cart_htl_data[$type_key]['id_product'] = $type_value['product_id'];
- $cart_htl_data[$type_key]['cover_img'] = $cover_img;
$cart_htl_data[$type_key]['hotel_name'] = $rm_dtl['hotel_name'];
$objBookingDemand = new HotelBookingDemands();
foreach ($order_bk_data as $data_k => $data_v) {
@@ -579,13 +578,14 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$totalDemandsPriceTE += $cart_htl_data[$type_key]['date_diff'][$date_join]['extra_demands_price_te'];
$totalDemandsPriceTI += $cart_htl_data[$type_key]['date_diff'][$date_join]['extra_demands_price_ti'];
}
- if ($extraDemands = array_shift($objBookingDemand->getRoomTypeBookingExtraDemands(
+ if ($extraDemands = $objBookingDemand->getRoomTypeBookingExtraDemands(
$order_obj->id,
$type_value['product_id'],
$data_v['id_room'],
$data_v['date_from'],
$data_v['date_to']
- ))) {
+ )) {
+ $extraDemands = array_shift($extraDemands);
$extraDemands['product_id'] = $type_value['product_id'];
$extraDemands['room_type_name'] = $type_value['product_name'];
$extraDemands['date_from'] = $data_v['date_from'];
@@ -593,7 +593,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$room_extra_demands[] = $extraDemands;
}
- if ($additionalServices = array_shift($objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+ if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order_obj->id,
0,
0,
@@ -601,8 +601,8 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$data_v['date_from'],
$data_v['date_to'],
$data_v['id_room']
- ))) {
-
+ )) {
+ $additionalServices = array_shift($additionalServices);
$additionalServices['product_id'] = $type_value['product_id'];
$additionalServices['room_type_name'] = $type_value['product_name'];
$additionalServices['date_from'] = $data_v['date_from'];
@@ -610,7 +610,6 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$room_additinal_services[] = $additionalServices;
}
-
// Set tax_code
if ($taxes = OrderDetail::getTaxListStatic($data_v['id_order_detail'])) {
$tax_temp = array();
diff --git a/config/alias.php b/config/alias.php
index 724378f24..647c0598e 100644
--- a/config/alias.php
+++ b/config/alias.php
@@ -78,7 +78,7 @@ function displayFatalError()
$error = error_get_last();
}
if ($error !== null && in_array($error['type'], array(E_ERROR, E_PARSE, E_COMPILE_ERROR ))) {
- echo '[PrestaShop] Fatal error in module file :'.$error['file'].': '.$error['message'];
+ echo '[QloApps] Fatal error in module file :'.$error['file'].': '.$error['message'];
}
}
diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php
index 087e3ca95..95da147ce 100644
--- a/controllers/admin/AdminCartsController.php
+++ b/controllers/admin/AdminCartsController.php
@@ -844,6 +844,15 @@ class AdminCartsControllerCore extends AdminController
}
}
+ $cart_detail_data_obj = new HotelCartBookingData();
+ $cart_detail_data = $cart_detail_data_obj->getCartFormatedBookinInfoByIdCart((int) $id_cart);
+ $is_backdate_order = false;
+ $currentDate = strtotime(date('Y-m-d'));
+ foreach ($cart_detail_data as $cartRoom) {
+ if (strtotime($cartRoom['date_from']) < $currentDate) {
+ $is_backdate_order = true;
+ }
+ }
$addresses = $this->context->customer->getAddresses((int)$this->context->cart->id_lang);
foreach ($addresses as &$data) {
@@ -853,6 +862,8 @@ class AdminCartsControllerCore extends AdminController
return array(
'summary' => $this->getCartSummary(),
+ 'cart_detail_data' => $cart_detail_data,
+ 'is_backdate_order' => $is_backdate_order,
'delivery_option_list' => $this->getDeliveryOptionList(),
'cart' => $this->context->cart,
'currency' => new Currency($this->context->cart->id_currency),
diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php
index 64308b5a7..ab1a12d45 100644
--- a/controllers/admin/AdminEmployeesController.php
+++ b/controllers/admin/AdminEmployeesController.php
@@ -175,6 +175,8 @@ class AdminEmployeesControllerCore extends AdminController
public function initPageHeaderToolbar()
{
+ parent::initPageHeaderToolbar();
+
if (empty($this->display)) {
$this->page_header_toolbar_btn['new_employee'] = array(
'href' => self::$currentIndex.'&addemployee&token='.$this->token,
@@ -193,8 +195,6 @@ class AdminEmployeesControllerCore extends AdminController
$this->toolbar_title);
}
}
-
- parent::initPageHeaderToolbar();
}
public function renderList()
diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php
index be4f42fab..5ddf08b05 100644
--- a/controllers/admin/AdminImportController.php
+++ b/controllers/admin/AdminImportController.php
@@ -2110,7 +2110,7 @@ class AdminImportControllerCore extends AdminController
Tools::displayError('%s cannot be saved'),
(isset($image->id_product) ? ' ('.$image->id_product.')' : '')
);
- $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').Db::getInstance()->getMsgError()();
+ $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').Db::getInstance()->getMsgError();
}
}
}
diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php
index 7e0b23ffb..0eae6b275 100644
--- a/controllers/admin/AdminModulesController.php
+++ b/controllers/admin/AdminModulesController.php
@@ -1836,7 +1836,9 @@ class AdminModulesControllerCore extends AdminController
$this->errors[] = $this->l('Module not found!');
}
} else {
- $this->errors[] = $this->l('There was some error while updating the module');
+ $response['success'] = true;
+ $response['msg'] = $this->l('Module files updated successfully');
+ $response['data']['redirect'] = $this->context->link->getAdminLink('AdminModules').'&conf=29&anchor='.$module->name;
}
} else {
$this->errors[] = $this->l('Module not installed, install module before updating.');
diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php
index 2e26d80bc..631df7d92 100644
--- a/controllers/admin/AdminNormalProductsController.php
+++ b/controllers/admin/AdminNormalProductsController.php
@@ -1590,7 +1590,7 @@ class AdminNormalProductsControllerCore extends AdminController
if ($res) {
$this->jsonConfirmation($this->_conf[7]);
} else {
- $this->jsonError(Tools::displayError('An error occurred while attempting to delete the room type image.'));
+ $this->jsonError(Tools::displayError('An error occurred while attempting to delete the product image.'));
}
}
@@ -2154,11 +2154,11 @@ class AdminNormalProductsControllerCore extends AdminController
// Categories
if ($this->isProductFieldUpdated('id_category_default') && (!Tools::isSubmit('categoryBox') || !count(Tools::getValue('categoryBox')))) {
- $this->errors[] = $this->l('This room type must be in at least one category.');
+ $this->errors[] = $this->l('This product 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 room type must be in the default category.');
+ $this->errors[] = $this->l('This product must be in the default category.');
}
// Tags
@@ -3472,7 +3472,7 @@ class AdminNormalProductsControllerCore extends AdminController
if (!Validate::isLoadedObject($product)) {
$files = array();
- $files[0]['error'] = Tools::displayError('Cannot add image because room type creation failed.');
+ $files[0]['error'] = Tools::displayError('Cannot add image because product creation failed.');
}
$image_uploader = new HelperImageUploader('file');
@@ -3663,10 +3663,10 @@ class AdminNormalProductsControllerCore extends AdminController
$data->assign('imageType', ImageType::getFormatedName('small'));
}
} else {
- $this->displayWarning($this->l('You must save the room type in this shop before adding images.'));
+ $this->displayWarning($this->l('You must save the product in this shop before adding images.'));
}
} else {
- $this->displayWarning($this->l('You must save this room type before adding images.'));
+ $this->displayWarning($this->l('You must save this product before adding images.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
@@ -3957,7 +3957,7 @@ class AdminNormalProductsControllerCore extends AdminController
echo '{"hasError" : true, "errors" : "Can not update product '.(int)$id_product.' to position '.(int)$position.' "}';
}
} else {
- echo '{"hasError" : true, "errors" : "This room type ('.(int)$id_product.') can t be loaded"}';
+ echo '{"hasError" : true, "errors" : "This product ('.(int)$id_product.') can t be loaded"}';
}
break;
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index 039260ad1..63a271ecd 100644
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -1638,7 +1638,8 @@ class AdminOrdersControllerCore extends AdminController
1,
0
);
- $order_detail_data[$key]['total_room_price_ti'] += $totalConvenienceFeeTI += $order_detail_data[$key]['convenience_fee_ti'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+
+ $order_detail_data[$key]['convenience_fee_ti'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order->id,
0,
0,
@@ -1651,7 +1652,10 @@ class AdminOrdersControllerCore extends AdminController
1,
Product::PRICE_ADDITION_TYPE_INDEPENDENT
);
- $order_detail_data[$key]['total_room_price_te'] += $totalConvenienceFeeTE += $order_detail_data[$key]['convenience_fee_te'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+ $order_detail_data[$key]['total_room_price_ti'] += $order_detail_data[$key]['convenience_fee_ti'];
+ $totalConvenienceFeeTI += $order_detail_data[$key]['convenience_fee_ti'];
+
+ $order_detail_data[$key]['convenience_fee_te'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order->id,
0,
0,
@@ -1664,7 +1668,11 @@ class AdminOrdersControllerCore extends AdminController
1,
Product::PRICE_ADDITION_TYPE_INDEPENDENT
);
- $order_detail_data[$key]['total_room_price_ti'] += $order_detail_data[$key]['additional_services_price_auto_add_ti'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+
+ $order_detail_data[$key]['total_room_price_te'] += $order_detail_data[$key]['convenience_fee_te'];
+ $totalConvenienceFeeTE += $order_detail_data[$key]['convenience_fee_te'];
+
+ $order_detail_data[$key]['additional_services_price_auto_add_ti'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order->id,
0,
0,
@@ -1677,7 +1685,9 @@ class AdminOrdersControllerCore extends AdminController
1,
Product::PRICE_ADDITION_TYPE_WITH_ROOM
);
- $order_detail_data[$key]['total_room_price_te'] += $order_detail_data[$key]['additional_services_price_auto_add_te'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+ $order_detail_data[$key]['total_room_price_ti'] += $order_detail_data[$key]['additional_services_price_auto_add_ti'];
+
+ $order_detail_data[$key]['additional_services_price_auto_add_te'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order->id,
0,
0,
@@ -1690,6 +1700,8 @@ class AdminOrdersControllerCore extends AdminController
1,
Product::PRICE_ADDITION_TYPE_WITH_ROOM
);
+ $order_detail_data[$key]['total_room_price_te'] += $order_detail_data[$key]['additional_services_price_auto_add_te'];
+
$cust_obj = new Customer($value['id_customer']);
if ($cust_obj->firstname) {
$order_detail_data[$key]['alloted_cust_name'] = $cust_obj->firstname.' '.$cust_obj->lastname;
@@ -3132,7 +3144,8 @@ class AdminOrdersControllerCore extends AdminController
Group::getCurrent()->id,
$this->context->cart->id,
$this->context->cookie->id_guest,
- $objCartBookingData->id_room
+ $objCartBookingData->id_room,
+ 0
);
$objBookingDetail->total_price_tax_excl = $total_price['total_price_tax_excl'];
$objBookingDetail->total_price_tax_incl = $total_price['total_price_tax_incl'];
@@ -4093,7 +4106,7 @@ class AdminOrdersControllerCore extends AdminController
// Update Order
// values changes as values are calculated accoding to the quantity of the product by webkul
- $order->total_paid -= ($diff_products_tax_incl + $roomExtraDemandTI);
+ $order->total_paid -= ($diff_products_tax_incl + $roomExtraDemandTI + $additionlServicesTI);
$order->total_paid_tax_incl -= ($diff_products_tax_incl + $roomExtraDemandTI + $additionlServicesTI);
$order->total_paid_tax_excl -= ($diff_products_tax_excl + $roomExtraDemandTE + $additionlServicesTE);
$order->total_products -= ($diff_products_tax_excl + $additionlServicesTE);
@@ -4750,9 +4763,11 @@ class AdminOrdersControllerCore extends AdminController
// get room type additional demands
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
if ($roomTypeServiceProducts = $objRoomTypeServiceProduct->getServiceProductsData($idProduct, 1, 0, false, 2, null)) {
- foreach ($roomTypeServiceProducts as $key => $product) {
- if (in_array($product['id_product'], array_column($additionalServices['additional_services'], 'id_product'))) {
- unset($roomTypeServiceProducts[$key]);
+ if ($additionalServices) {
+ foreach ($roomTypeServiceProducts as $key => $product) {
+ if (in_array($product['id_product'], array_column($additionalServices['additional_services'], 'id_product'))) {
+ unset($roomTypeServiceProducts[$key]);
+ }
}
}
$smartyVars['roomTypeServiceProducts'] = $roomTypeServiceProducts;
@@ -4957,7 +4972,7 @@ class AdminOrdersControllerCore extends AdminController
$order->total_paid_tax_excl -= $priceTaxExcl;
$order->total_paid_tax_incl -= $priceTaxIncl;
- $order->total_paid += $priceTaxIncl;
+ $order->total_paid -= $priceTaxIncl;
$res &= $order->update();
}
diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php
index 88df3cd66..ea7dc07d2 100644
--- a/controllers/admin/AdminProductsController.php
+++ b/controllers/admin/AdminProductsController.php
@@ -1123,7 +1123,6 @@ class AdminProductsControllerCore extends AdminController
// process price update
$idProduct = Tools::getValue('id_product');
$idServiceProduct = Tools::getValue('service_product_id');
- $idProductRoomtypePrice = Tools::getValue('id_room_type_service_product_price');
$price = Tools::getValue('price');
$id_tax_rules_group = Tools::getValue('id_tax_rules_group');
@@ -3298,6 +3297,7 @@ class AdminProductsControllerCore extends AdminController
'selectedDemands' => $selectedDemands,
'allDemands' => $allDemands,
'defaultcurrencySign' => $objCurrency->sign,
+ 'idDefaultcurrency' => $objCurrency->id,
));
} else {
$this->displayWarning($this->l('You must save this room type before managing additional facilities.'));
diff --git a/controllers/admin/AdminStatsController.php b/controllers/admin/AdminStatsController.php
index b6d755db9..ae35d50bd 100644
--- a/controllers/admin/AdminStatsController.php
+++ b/controllers/admin/AdminStatsController.php
@@ -1107,7 +1107,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
);
if ($numAllOrders != 0) {
- return $numCancelledOrders / $numAllOrders * 100;
+ return $numCancelledOrders / $numAllOrders;
} else {
return 0;
}
@@ -1693,7 +1693,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
$totalRevenue = (float) self::getRevenue($dateFrom, $dateTo, $idHotel);
- return $totalRevenue ? ($directRevenue / $totalRevenue) * 100 : 0;
+ return $totalRevenue ? ($directRevenue / $totalRevenue) : 0;
}
public static function getOperatingExpensesForDiscreteDates($dateFrom, $dateTo = null, $idHotel = null, $useCache = true)
diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php
index 7dbd73476..4a3a306c7 100644
--- a/controllers/admin/AdminThemesController.php
+++ b/controllers/admin/AdminThemesController.php
@@ -716,6 +716,8 @@ class AdminThemesControllerCore extends AdminController
public function initPageHeaderToolbar()
{
+ parent::initPageHeaderToolbar();
+
if (empty($this->display)) {
$this->page_header_toolbar_btn['import_theme'] = array(
'href' => self::$currentIndex.'&action=importtheme&token='.$this->token,
@@ -744,8 +746,6 @@ class AdminThemesControllerCore extends AdminController
$title = implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $this->toolbar_title);
$this->page_header_toolbar_title = $title;
-
- parent::initPageHeaderToolbar();
}
private function checkParentClass($name)
diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php
index 79a61fbd3..026ae648a 100644
--- a/controllers/front/CategoryController.php
+++ b/controllers/front/CategoryController.php
@@ -159,7 +159,9 @@ class CategoryControllerCore extends FrontController
// get occupancy of the search
$occupancy = Tools::getValue('occupancy');
-
+ if (!Validate::isOccupancy($occupancy)) {
+ $occupancy = array();
+ }
$currency = new Currency($this->context->currency->id);
if ($id_hotel = HotelBranchInformation::getHotelIdByIdCategory($id_category)) {
@@ -267,7 +269,9 @@ class CategoryControllerCore extends FrontController
// occupancy of the search
$occupancy = Tools::getValue('occupancy');
-
+ if (!Validate::isOccupancy($occupancy)) {
+ $occupancy = array();
+ }
$sort_by = Tools::getValue('sort_by');
$sort_value = Tools::getValue('sort_value');
$filter_data = Tools::getValue('filter_data');
diff --git a/controllers/front/GuestTrackingController.php b/controllers/front/GuestTrackingController.php
index dca2c4266..806e2dfa5 100644
--- a/controllers/front/GuestTrackingController.php
+++ b/controllers/front/GuestTrackingController.php
@@ -115,6 +115,7 @@ class GuestTrackingControllerCore extends FrontController
$method = Tools::getValue('method');
if ($method == 'getRoomTypeBookingDemands') {
+ $response = array('reload' => false);
$extraDemandsTpl = '';
if (($idProduct = Tools::getValue('id_product'))
&& ($idOrder = Tools::getValue('id_order'))
@@ -122,7 +123,6 @@ class GuestTrackingControllerCore extends FrontController
&& ($dateTo = Tools::getValue('date_to'))
) {
$objBookingDemand = new HotelBookingDemands();
- $order = new Order($idOrder);
$customer = new Customer((int)$order->id_customer);
$useTax = 0;
if (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC) {
@@ -144,10 +144,27 @@ class GuestTrackingControllerCore extends FrontController
'extraDemands' => $extraDemands,
)
);
- $extraDemandsTpl .= $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order_booking_demands.tpl');
}
+ $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
+ if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+ $idOrder,
+ 0,
+ 0,
+ $idProduct,
+ $dateFrom,
+ $dateTo,
+ 0,
+ 0,
+ $useTax
+ )) {
+ $this->context->smarty->assign(array(
+ 'useTax' => $useTax,
+ 'additionalServices' => $additionalServices,
+ ));
+ }
+ $response['extra_demands'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order_booking_demands.tpl');
}
- die($extraDemandsTpl);
+ $this->ajaxDie(json_encode($response));
}
/* Handle brute force attacks */
@@ -285,6 +302,13 @@ class GuestTrackingControllerCore extends FrontController
if ($data_v['is_back_order']) {
$anyBackOrder = 1;
}
+ if ($data_v['is_refunded']) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_refunded'] += 1;
+ }
+ if ($data_v['is_cancelled']) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_cancelled'] += 1;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_refunded'] -= 1;
+ }
} else {
$num_days = $objBookingDetail->getNumberOfDays($data_v['date_from'], $data_v['date_to']);
$cartHotelData[$type_key]['date_diff'][$date_join]['num_rm'] = 1;
@@ -304,8 +328,19 @@ class GuestTrackingControllerCore extends FrontController
if ($data_v['is_back_order']) {
$anyBackOrder = 1;
}
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_cancelled'] = 0;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_refunded'] = 0;
+ if ($data_v['is_refunded']) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_refunded'] += 1;
+ }
+ if ($data_v['is_cancelled']) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_cancelled'] += 1;
+ $cartHotelData[$type_key]['date_diff'][$date_join]['count_refunded'] -= 1;
+ }
}
+ $cartHotelData[$type_key]['date_diff'][$date_join]['is_refunded'] = $data_v['is_refunded'];
+
$cartHotelData[$type_key]['date_diff'][$date_join]['ids_htl_booking_detail'][] = $data_v['id'];
$cartHotelData[$type_key]['date_diff'][$date_join]['extra_demands'] = $objBookingDemand->getRoomTypeBookingExtraDemands(
@@ -390,6 +425,39 @@ class GuestTrackingControllerCore extends FrontController
1,
0
);
+ // get auto added price to be displayed with room price
+ if (empty($cartHotelData[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_ti'])) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_ti'] = 0;
+ }
+ $cartHotelData[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_ti'] += $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+ $idOrder,
+ 0,
+ 0,
+ $type_value['product_id'],
+ $data_v['date_from'],
+ $data_v['date_to'],
+ $data_v['id_room'],
+ 1,
+ 1,
+ 1,
+ Product::PRICE_ADDITION_TYPE_WITH_ROOM
+ );
+ if (empty($cartHotelData[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_te'])) {
+ $cartHotelData[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_te'] = 0;
+ }
+ $cartHotelData[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_te'] += $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
+ $idOrder,
+ 0,
+ 0,
+ $type_value['product_id'],
+ $data_v['date_from'],
+ $data_v['date_to'],
+ $data_v['id_room'],
+ 1,
+ 0,
+ 1,
+ Product::PRICE_ADDITION_TYPE_WITH_ROOM
+ );
}
// get auto added price to be displayed with room price
if (empty($cartHotelData[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_ti'])) {
diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php
index 9bb0ba5f0..1d6edb6c3 100644
--- a/controllers/front/ProductController.php
+++ b/controllers/front/ProductController.php
@@ -408,7 +408,11 @@ class ProductControllerCore extends FrontController
)
);
- $this->assignBookingFormVars($this->product->id, $date_from, $date_to);
+ $occupancy_value = array();
+ if (Configuration::get('PS_FRONT_ROOM_UNIT_SELECTION_TYPE') == HotelBookingDetail::PS_ROOM_UNIT_SELECTION_TYPE_QUANTITY) {
+ $occupancy_value = 1;
+ }
+ $this->assignBookingFormVars($this->product->id, $date_from, $date_to, $occupancy_value);
$this->assignServiceProductVars();
// product price after imposing feature prices...
@@ -1218,14 +1222,15 @@ class ProductControllerCore extends FrontController
$dateFrom = Tools::getValue('date_from');
$dateTo = Tools::getValue('date_to');
$occupancy = Tools::getValue('occupancy');
+ if (!Validate::isOccupancy($occupancy)) {
+ $occupancy = array();
+ }
$roomTypeDemands = Tools::getValue('room_type_demands');
$roomServiceProducts = Tools::getValue('room_service_products');
$dateFrom = date('Y-m-d', strtotime($dateFrom));
$dateTo = date('Y-m-d', strtotime($dateTo));
- if ($occupancy == false) {
- $occupancy = array();
- }
+
$this->assignServiceProductVars();
if ($this->assignBookingFormVars(
$idProduct,
diff --git a/js/admin/products.js b/js/admin/products.js
index 34863cfa9..8dd79764e 100644
--- a/js/admin/products.js
+++ b/js/admin/products.js
@@ -509,7 +509,6 @@ product_tabs['ServiceProduct'] = new function(){
data: {
id_product: id_product,
service_product_id : $(this).data('id_product'),
- id_room_type_service_product_price : $(this).data('id_room_type_service_product_price'),
price: price,
id_tax_rules_group: id_tax_rules_group,
action: 'updatedServiceProductPrice',
diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js
index b23f26b68..01bb0f3a4 100644
--- a/modules/blockcart/ajax-cart.js
+++ b/modules/blockcart/ajax-cart.js
@@ -912,7 +912,7 @@ var ajaxCart = {
content += '';
content += '' + $.datepicker.formatDate(ajaxCart.dateFormat, new Date(date_diff_v.data_form)) + ' - ' + $.datepicker.formatDate(ajaxCart.dateFormat, new Date(date_diff_v.data_to)) + ' ';
content += '' + date_diff_v.num_rm + ' ';
- content += '' + formatCurrency(parseFloat(date_diff_v.amount), currency_format, currency_sign, currency_blank) + ' ';
+ content += '' + formatCurrency(parseFloat(date_diff_v.amount) + parseFloat(date_diff_v.demand_price), currency_format, currency_sign, currency_blank) + ' ';
content += '';
content += ' ';
content += ' ';
@@ -949,7 +949,7 @@ var ajaxCart = {
booking_dates_content += ' ';
booking_dates_content += '' + $.datepicker.formatDate(ajaxCart.dateFormat, new Date(date_diff_v1.data_form)) + ' - ' + $.datepicker.formatDate(ajaxCart.dateFormat, new Date(date_diff_v1.data_to)) + ' ';
booking_dates_content += '' + date_diff_v1.num_rm + ' ';
- booking_dates_content += '' + formatCurrency(parseFloat(date_diff_v1.amount), currency_format, currency_sign, currency_blank) + ' ';
+ booking_dates_content += '' + formatCurrency(parseFloat(date_diff_v1.amount) + parseFloat(date_diff_v1.demand_price), currency_format, currency_sign, currency_blank) + ' ';
booking_dates_content += '';
booking_dates_content += ' ';
booking_dates_content += ' ';
@@ -1154,16 +1154,20 @@ var ajaxCart = {
if (hasDeliveryAddress)
$('.ajax_cart_shipping_cost').parent().find('.unvisible').show();
- $('.ajax_cart_tax_cost').text(jsonData.taxCost);
+ $('.ajax_cart_tax_cost').text(jsonData.tax_cost);
$('.cart_block_wrapping_cost').text(jsonData.wrapping_cost);
$('.ajax_block_cart_total').text(jsonData.total);
$('.ajax_block_cart_total').attr('total_cart_price', jsonData.totalToPay);
- $('.ajax_block_products_total').text(jsonData.product_total);
- $('.ajax_block_room_total').text(jsonData.roomTotal);
+ $('.ajax_block_room_total').text(jsonData.room_total);
$('.ajax_block_nornal_products_total').text(jsonData.normalProductsTotal);
- $('.ajax_cart_extra_demands_cost').text(jsonData.total_extra_services_format);
+ $('.ajax_cart_convenience_fee').text(jsonData.total_convenience_fee_format);
+ if (jsonData.total_convenience_fee) {
+ $('.ajax_cart_convenience_fee').parent().show();
+ } else {
+ $('.ajax_cart_convenience_fee').parent().hide();
+ }
$('.ajax_total_price_wt').text(jsonData.total_price_wt);
if (parseFloat(jsonData.free_shipping_float) > 0) {
@@ -1255,6 +1259,16 @@ function disableRoomTypeDemands(show) {
}
}
+function disableRoomTypeServices(disable) {
+ if (disable) {
+ $('#service_products_cont').find('button.add_roomtype_product').attr('disabled', 'disabled');
+ $('#service_products_cont').find('.qty_container .qty_direction a').attr('disabled', 'disabled');
+ } else {
+ $('#service_products_cont').find('button.add_roomtype_product').removeAttr('disabled');
+ $('#service_products_cont').find('.qty_container .qty_direction a').removeAttr('disabled');
+ }
+}
+
function getRoomsExtraDemands()
{
var roomDemands = [];
diff --git a/modules/blockcart/blockcart.css b/modules/blockcart/blockcart.css
index fa6ae376e..35e18d341 100644
--- a/modules/blockcart/blockcart.css
+++ b/modules/blockcart/blockcart.css
@@ -1,39 +1,38 @@
-/*******************************************************************
- Cart Block Styles
-********************************************************************/
-#header .shopping_cart {
- position: relative;
- float: right;
- /*margin-bottom: 20px;*/
- /*padding-top: 5px;*/ }
- #header .shopping_cart > a:first-child:after {
- content: "\f0d7";
- font-family: "FontAwesome";
- display: inline-block;
- float: right;
- font-size: 11px;
- color: #FFFFFF;
- padding: 6px 0 0 0; }
- #header .shopping_cart > a:first-child:hover:after {
- content: "\f0d8";
- padding: 4px 0px 0px 0px; }
+/**
+* 2010-2022 Webkul.
+*
+* NOTICE OF LICENSE
+*
+* All right is reserved,
+* Please go through LICENSE.txt file inside our module
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade this module to newer
+* versions in the future. If you wish to customize this module for your
+* needs please refer to CustomizationPolicy.txt file inside our module for more information.
+*
+* @author Webkul IN
+* @copyright 2010-2022 Webkul IN
+* @license LICENSE.txt
+*/
-.shopping_cart {
- width: 34px; }
- @media (max-width: 480px) {
- /*.shopping_cart {
- padding-top: 20px; }*/ }
- @media (max-width: 1200px) {
- .shopping_cart {
- margin: 0 auto;
- float: none;} }
+#header .shopping_cart > a:first-child:after {
+ content: "\f0d7";
+ font-family: "FontAwesome";
+ font-size: 12px;
+ padding: 0 2px;
+ position: relative;
+ top: -1px;
+ color: #fff; }
+#header .shopping_cart > a:first-child:hover::after {
+ content: "\f0d8";
+ top: -2px; }
.shopping_cart > a:first-child {
- /*padding: 7px 10px;*/
- padding-top: 7px;
- /*background-color: #BF9958;*/
display: block;
font-weight: bold;
- color: #777777;
+ font-size: 20px;
+ color: #777;
text-shadow: 1px 1px rgba(0, 0, 0, 0.2);
overflow: hidden; }
@media (min-width: 768px) and (max-width: 991px) {
@@ -49,15 +48,8 @@
.shopping_cart > a:first-child:before {
content: "\f07a";
font-family: "FontAwesome";
- display: inline-block;
- font-size: 20px;
- line-height: 23px;
color: #fff;
- top: 9px;
- left: 0px;
- z-index: 100;
- position: absolute;
- padding-right: 5px; }
+ z-index: 100; }
.shopping_cart .ajax_cart_total {
display: none !important; }
.shopping_cart .block_cart_expand:after, .shopping_cart .block_cart_collapse:after {
@@ -234,7 +226,7 @@
.cart_block .cart_block_tax_cost,
.cart_block .cart_block_total,
.cart_block .cart_block_wrapping_cost,
-.cart_block .cart_block_additional_facilities_cost {
+.cart_block .cart_block_convenience_fee {
float: right; }
.cart_block table.vouchers {
@@ -487,11 +479,10 @@
.remove_rooms_from_cart_link:hover {
color: #515151; }
-.badge_style
-{
+.badge_style {
left: 13px;
position: absolute;
- top: 2px;
+ top: -8px;
z-index: 200;
}
@@ -547,4 +538,4 @@
{
border: none;
}
-}
\ No newline at end of file
+}
diff --git a/modules/blockcart/blockcart.php b/modules/blockcart/blockcart.php
index 35eb65e97..17d01b341 100644
--- a/modules/blockcart/blockcart.php
+++ b/modules/blockcart/blockcart.php
@@ -267,7 +267,10 @@ class Blockcart extends Module
unset($this->context->cookie->currentAddedProduct);
}
- $totalAdditionalServicesPrice = $this->context->cart->getOrderTotal(false, Cart::ONLY_ROOM_SERVICES_WITHOUT_AUTO_ADD);
+ $totalAdditionalServicesWithoutAutoAddPrice = $params['cart']->getOrderTotal($useTax, Cart::ONLY_ROOM_SERVICES_WITHOUT_AUTO_ADD);
+ $totalAdditionalServicesWithAutoAddPrice = $params['cart']->getOrderTotal($useTax, Cart::ONLY_ROOM_SERVICES);
+ $totalConvenienceFee = $params['cart']->getOrderTotal($useTax, Cart::ONLY_CONVENIENCE_FEE);
+ $totalRoomsPrice = $params['cart']->getOrderTotal($useTax, Cart::ONLY_ROOMS);
$response = array(
'products' => $products,
@@ -285,11 +288,10 @@ class Blockcart extends Module
'tax_cost' => $tax_cost,
'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency),
'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::ONLY_PRODUCTS), $currency),
- 'room_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::ONLY_ROOMS), $currency),
- // 'normal_products_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::ONLY_NORMAL_PRODUCTS), $currency),
+ 'room_total' => Tools::displayPrice($totalRoomsPrice + $totalDemandsPrice + $totalAdditionalServicesWithAutoAddPrice - $totalConvenienceFee),
'totalToPay' => $totalToPay,
- 'total_extra_services' => $totalDemandsPrice + $totalAdditionalServicesPrice,
- 'total_extra_services_format' => Tools::displayPrice(($totalDemandsPrice + $totalAdditionalServicesPrice), $currency),
+ 'total_convenience_fee' => $totalConvenienceFee,
+ 'total_convenience_fee_format' => Tools::displayPrice(($totalConvenienceFee), $currency),
'total' => Tools::displayPrice($totalToPay, $currency),
'order_process' => $orderProcess,
'ajax_allowed' => (int) (Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false,
diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl
index 6c64c9c3b..bbeb68201 100644
--- a/modules/blockcart/blockcart.tpl
+++ b/modules/blockcart/blockcart.tpl
@@ -124,7 +124,7 @@
{$data_v['data_form']|date_format:"%d-%m-%Y"} - {$data_v['data_to']|date_format:"%d-%m-%Y"}
{$data_v['num_rm']}
- {convertPrice price=$data_v['amount']}
+ {convertPrice price=($data_v['amount'] + $data_v['demand_price'])}
{/foreach}
@@ -222,10 +222,10 @@
{l s='Tax' mod='blockcart'}
{/if}
- {if isset($total_extra_services)}
+ {if isset($total_convenience_fee)}
- {convertPrice price=$total_extra_services}
- {l s='Extra Services Cost' mod='blockcart'}
+ {convertPrice price=$total_convenience_fee}
+ {l s='Convenience Fees' mod='blockcart'}
{/if}
@@ -314,7 +314,7 @@
{/if}
{/if}
-
+
{if $cart_qties > 0}
{convertPrice price=$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS)}
{/if}
@@ -354,16 +354,16 @@
{/if}
-->
- {if isset($total_extra_services)}
+ {if isset($total_convenience_fee)}
- {l s='Total Extra Services Cost' mod='blockcart'}
- {convertPrice price=$total_extra_services}
+ {l s='Convenience Fees' mod='blockcart'}
+ {convertPrice price=$total_convenience_fee}
{/if}
{if $show_tax && $use_tax}
{l s='Tax' mod='blockcart'}
- {$tax_cost}
+ {$tax_cost}
{/if}
@@ -377,7 +377,7 @@
{/if}
{/if}
-
+
{if $cart_qties > 0}
{if $priceDisplay == 1}
{convertPrice price=$cart->getOrderTotal(false)}
diff --git a/modules/dashinsights/dashinsights.php b/modules/dashinsights/dashinsights.php
index 78b19fef4..87b952df2 100644
--- a/modules/dashinsights/dashinsights.php
+++ b/modules/dashinsights/dashinsights.php
@@ -223,7 +223,7 @@ class DashInsights extends Module
unset($idsHotel[$key]);
}
- if (count($idsHotel) > 2) { // display average series only if other hotels are available
+ if (count($idsHotel) > 0) { // display average series only if other hotels are available
$averageRoomNightsData = AdminStatsController::getRoomNightsData($dateFrom, $dateTo, $idsHotel, true, true);
$averageSeriesInfo = array(
'data' => $averageRoomNightsData,
@@ -332,7 +332,7 @@ class DashInsights extends Module
unset($idsHotel[$key]);
}
- if (count($idsHotel) > 1) { // display average series only if other hotels are available
+ if (count($idsHotel) > 0) { // display average series only if other hotels are available
$averageDaysOfTheWeekData = AdminStatsController::getOccupiedRoomsForDaysOfTheWeek($dateFrom, $dateTo, $idsHotel, true, true);
$averageSeriesInfo = array(
'data' => $averageDaysOfTheWeekData,
@@ -465,7 +465,7 @@ class DashInsights extends Module
unset($idsHotel[$key]);
}
- if (count($idsHotel) > 1) { // display average series only if other hotels are available
+ if (count($idsHotel) > 0) { // display average series only if other hotels are available
$averageLengthOfStayData = AdminStatsController::getLengthOfStayPercentages($day, $dateFrom, $dateTo, $idsHotel, true, true);
$averageSeriesInfo = array(
'data' => $averageLengthOfStayData,
diff --git a/modules/dashinsights/views/js/dashinsights.js b/modules/dashinsights/views/js/dashinsights.js
index 8409a9478..d7edb1179 100644
--- a/modules/dashinsights/views/js/dashinsights.js
+++ b/modules/dashinsights/views/js/dashinsights.js
@@ -20,7 +20,6 @@
function line_chart_dashinsights(widget_name, chart_details) {
nv.addGraph(function () {
var chart = nv.models.lineChart()
- .interpolate('basis')
.useInteractiveGuideline(true)
.x(function (d) { return (d !== undefined ? d[0] : 0); })
.y(function (d) { return (d !== undefined ? d[1] : 0); })
@@ -88,12 +87,30 @@ function multibar_chart_los_dashinsights(widget_name, chart_details) {
chart.yAxis.tickFormat(d3.format(chart_details['y_format']));
+ chart.dispatch.stateChange = function () {
+ setTimeout(function () {
+ positionXAxisLabel();
+ }, 10);
+ }
+
d3.select('#dashinsights_length_of_stay svg')
.datum(chart_details.data)
.call(chart);
- nv.utils.windowResize(chart.update);
+ positionXAxisLabel();
+
+ nv.utils.windowResize(function() {
+ chart.update();
+ positionXAxisLabel();
+ });
return chart;
});
+
+ function positionXAxisLabel() {
+ d3.select('#dashinsights_length_of_stay .nv-x .nv-axislabel').attr(
+ 'transform',
+ d3.transform('rotate(-90) translate(-130, 40)').toString()
+ );
+ }
}
diff --git a/modules/dashperformance/dashperformance.php b/modules/dashperformance/dashperformance.php
index e60a3ce0e..c7e075c1c 100644
--- a/modules/dashperformance/dashperformance.php
+++ b/modules/dashperformance/dashperformance.php
@@ -88,7 +88,7 @@ class DashPerformance extends Module
$params['date_from'],
$params['date_to'],
$params['id_hotel']
- )).'%';
+ ) * 100).'%';
$data['dp_revenue_per_available_room'] = Tools::displayPrice(AdminStatsController::getRevenuePerAvailableRoom(
$params['date_from'],
$params['date_to'],
@@ -108,12 +108,12 @@ class DashPerformance extends Module
$params['date_from'],
$params['date_to'],
$params['id_hotel']
- )).'%';
+ ) * 100).'%';
$data['dp_cancellation_rate'] = sprintf('%0.2f', AdminStatsController::getCancellationRate(
$params['date_from'],
$params['date_to'],
$params['id_hotel']
- )).'%';
+ ) * 100).'%';
}
return array('data_value' => $data);
diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php
index 97cbb5398..b3d60de77 100644
--- a/modules/hotelreservationsystem/classes/HotelHelper.php
+++ b/modules/hotelreservationsystem/classes/HotelHelper.php
@@ -24,17 +24,17 @@ class HotelHelper
{
$objModule = new HotelreservationSystem();
$jsVars = array(
- 'display_name' => $objModule->l('Display', 'HotelHelper'),
- 'records_name' => $objModule->l('records per page', 'HotelHelper'),
- 'no_product' => $objModule->l('No records found', 'HotelHelper'),
- 'show_page' => $objModule->l('Showing page', 'HotelHelper'),
- 'show_of' => $objModule->l('of', 'HotelHelper'),
- 'no_record' => $objModule->l('No records available', 'HotelHelper'),
- 'filter_from' => $objModule->l('filtered from', 'HotelHelper'),
- 't_record' => $objModule->l('total records', 'HotelHelper'),
- 'search_item' => $objModule->l('Search', 'HotelHelper'),
- 'p_page' => $objModule->l('Previous', 'HotelHelper'),
- 'n_page' => $objModule->l('Next', 'HotelHelper'),
+ 'display_name' => $objModule->l('Display', 'HotelHelper', fasle, true),
+ 'records_name' => $objModule->l('records per page', 'HotelHelper', fasle, true),
+ 'no_product' => $objModule->l('No records found', 'HotelHelper', fasle, true),
+ 'show_page' => $objModule->l('Showing page', 'HotelHelper', fasle, true),
+ 'show_of' => $objModule->l('of', 'HotelHelper', fasle, true),
+ 'no_record' => $objModule->l('No records available', 'HotelHelper', fasle, true),
+ 'filter_from' => $objModule->l('filtered from', 'HotelHelper', fasle, true),
+ 't_record' => $objModule->l('total records', 'HotelHelper', fasle, true),
+ 'search_item' => $objModule->l('Search', 'HotelHelper', fasle, true),
+ 'p_page' => $objModule->l('Previous', 'HotelHelper', fasle, true),
+ 'n_page' => $objModule->l('Next', 'HotelHelper', fasle, true),
);
Media::addJsDef($jsVars);
diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php
index 2b4b84113..4cb2df0e2 100644
--- a/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php
+++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProduct.php
@@ -99,7 +99,7 @@ class RoomTypeServiceProduct extends ObjectModel
public function getProductsForRoomType($idProductRoomType)
{
- $sql .= 'SELECT `id_room_type_service_product`, `id_product`, `position` FROM `'._DB_PREFIX_.'htl_room_type_service_product`
+ $sql = 'SELECT `id_room_type_service_product`, `id_product`, `position` FROM `'._DB_PREFIX_.'htl_room_type_service_product`
WHERE `element_type` = '.self::WK_ELEMENT_TYPE_ROOM_TYPE.' AND `id_element` = '.(int)$idProductRoomType.'
ORDER BY `position` ASC';
diff --git a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php
index 4fdb1bdec..30ffa5075 100644
--- a/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php
+++ b/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php
@@ -724,11 +724,11 @@ class AdminAddHotelController extends ModuleAdminController
Media::addJsDef(
array(
- 'filesizeError' => $this->l('File exceeds maximum size.'),
+ 'filesizeError' => $this->l('File exceeds maximum size.', null, true),
'maxSizeAllowed' => Tools::getMaxUploadSize(),
'sortRowsUrl' => $this->context->link->getAdminLink('AdminAddHotel'),
'primaryHotelId' => Configuration::get('WK_PRIMARY_HOTEL'),
- 'disableHotelMsg' => $this->l('Primary hotel for website will be updated to first available active hotel.'),
+ 'disableHotelMsg' => $this->l('Primary hotel for website will be updated to first available active hotel.', null, true),
)
);
// GOOGLE MAP
diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php
index e51f9911f..74e120141 100644
--- a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php
+++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php
@@ -419,7 +419,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController
parent::setMedia();
Media::addJsDef(
array(
- 'filesizeError' => $this->l('File exceeds maximum size.'),
+ 'filesizeError' => $this->l('File exceeds maximum size.', null, true),
'maxSizeAllowed' => Tools::getMaxUploadSize(),
)
);
diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php
index 62f0baaea..54dc1142b 100644
--- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php
+++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php
@@ -122,9 +122,8 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
$id_room_type = 0;
}
- if (Tools::getValue('occupancy')) {
- $occupancy = Tools::getValue('occupancy');
- } else {
+ $occupancy = Tools::getValue('occupancy');
+ if (!Validate::isOccupancy($occupancy)) {
$occupancy = array();
}
@@ -616,6 +615,9 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
$date_from = Tools::getValue('date_from');
$date_to = Tools::getValue('date_to');
$occupancy = Tools::getValue('occupancy');
+ if (!Validate::isOccupancy($occupancy)) {
+ $occupancy = array();
+ }
$date_from = date("Y-m-d", strtotime($date_from));
$date_to = date("Y-m-d", strtotime($date_to));
@@ -807,33 +809,33 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
'max_child_in_room' => Configuration::get('WK_GLOBAL_MAX_CHILD_IN_ROOM'),
'occupancy_required_for_booking' => $occupancyRequiredForBooking,
'rooms_booking_url' => $this->context->link->getAdminLink('AdminHotelRoomsBooking'),
- 'opt_select_all' => $this->l('All Types'),
- 'slt_another_htl' => $this->l('Select Another Hotel'),
- 'product_type_cond' => $this->l('Product type is required'),
- 'from_date_cond' => $this->l('From date is required'),
- 'to_date_cond' => $this->l('To date is required'),
- 'hotel_name_cond' => $this->l('Hotel Name is required'),
- 'num_rooms_cond' => $this->l('Number of Rooms is required'),
- 'add_to_cart' => $this->l('Add To Cart'),
- 'remove' => $this->l('Remove'),
- 'noRoomTypeAvlTxt' => $this->l('No room type available.'),
- 'no_rm_avail_txt' => $this->l('No rooms available.'),
- 'slct_rm_err' => $this->l('Please select a room first.'),
- 'product_added_cart_txt' => $this->l('Product added in cart'),
+ 'opt_select_all' => $this->l('All Types', null, true),
+ 'slt_another_htl' => $this->l('Select Another Hotel', null, true),
+ 'product_type_cond' => $this->l('Product type is required', null, true),
+ 'from_date_cond' => $this->l('From date is required', null, true),
+ 'to_date_cond' => $this->l('To date is required', null, true),
+ 'hotel_name_cond' => $this->l('Hotel Name is required', null, true),
+ 'num_rooms_cond' => $this->l('Number of Rooms is required', null, true),
+ 'add_to_cart' => $this->l('Add To Cart', null, true),
+ 'remove' => $this->l('Remove', null, true),
+ 'noRoomTypeAvlTxt' => $this->l('No room type available.', null, true),
+ 'no_rm_avail_txt' => $this->l('No rooms available.', null, true),
+ 'slct_rm_err' => $this->l('Please select a room first.', null, true),
+ 'product_added_cart_txt' => $this->l('Product added in cart', null, true),
'info_icon_path' => _MODULE_DIR_.$this->module->name.'/views/img/Slices/info-icon.svg',
- 'select_age_txt' => 'Select age',
- 'under_1_age' => 'Under 1',
- 'room_txt' => 'Room',
- 'rooms_txt' => 'Rooms',
- 'remove_txt' => 'Remove',
- 'adult_txt' => 'Adults',
- 'adults_txt' => 'Adults',
- 'child_txt' => 'Child',
- 'children_txt' => 'Children',
- 'below_txt' => 'Below',
- 'years_txt' => 'years',
- 'all_children_txt' => 'All Children',
- 'invalid_occupancy_txt' => 'Invalid occupancy(adults/children) found.',
+ 'select_age_txt' => $this->l('Select age', null, true),
+ 'under_1_age' => $this->l('Under 1', null, true),
+ 'room_txt' => $this->l('Room', null, true),
+ 'rooms_txt' => $this->l('Rooms', null, true),
+ 'remove_txt' => $this->l('Remove', null, true),
+ 'adult_txt' => $this->l('Adults', null, true),
+ 'adults_txt' => $this->l('Adults', null, true),
+ 'child_txt' => $this->l('Child', null, true),
+ 'children_txt' => $this->l('Children', null, true),
+ 'below_txt' => $this->l('Below', null, true),
+ 'years_txt' => $this->l('years', null, true),
+ 'all_children_txt' => $this->l('All Children', null, true),
+ 'invalid_occupancy_txt' => $this->l('Invalid occupancy(adults/children) found.', null, true),
// 'check_calender_var' => $check_calender_var,
);
if (Configuration::get('PS_BACKOFFICE_SEARCH_TYPE') == HotelBookingDetail::SEARCH_TYPE_OWS ) {
diff --git a/modules/hotelreservationsystem/hotelreservationsystem.php b/modules/hotelreservationsystem/hotelreservationsystem.php
index 21dc93d1d..5e85ac22d 100644
--- a/modules/hotelreservationsystem/hotelreservationsystem.php
+++ b/modules/hotelreservationsystem/hotelreservationsystem.php
@@ -73,23 +73,25 @@ class HotelReservationSystem extends Module
date('d-m-Y', strtotime(date('Y-m-d', time()).' + 1 year'))
);
}
- /*To remove room from cart before todays date*/
- if (isset($this->context->cart->id) && $this->context->cart->id) {
- $htlCart = new HotelCartBookingData();
- if ($cartBookingData = $htlCart->getCartBookingDetailsByIdCartIdGuest(
- $this->context->cart->id,
- $this->context->cart->id_guest,
- $this->context->language->id
- )) {
- foreach ($cartBookingData as $cartRoom) {
- if (strtotime($cartRoom['date_from']) < strtotime(date('Y-m-d'))) {
- $htlCart->deleteRoomDataFromOrderLine(
- $cartRoom['id_cart'],
- $cartRoom['id_guest'],
- $cartRoom['id_product'],
- $cartRoom['date_from'],
- $cartRoom['date_to']
- );
+ if (!Configuration::get('PS_CATALOG_MODE')) {
+ /*To remove room from cart before todays date*/
+ if (isset($this->context->cart->id) && $this->context->cart->id) {
+ $htlCart = new HotelCartBookingData();
+ if ($cartBookingData = $htlCart->getCartBookingDetailsByIdCartIdGuest(
+ $this->context->cart->id,
+ $this->context->cart->id_guest,
+ $this->context->language->id
+ )) {
+ foreach ($cartBookingData as $cartRoom) {
+ if (strtotime($cartRoom['date_from']) < strtotime(date('Y-m-d'))) {
+ $htlCart->deleteRoomDataFromOrderLine(
+ $cartRoom['id_cart'],
+ $cartRoom['id_guest'],
+ $cartRoom['id_product'],
+ $cartRoom['date_from'],
+ $cartRoom['date_to']
+ );
+ }
}
}
}
diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
index 227e01ff2..d02a0b756 100644
--- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
+++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
@@ -714,7 +714,7 @@ $(document).ready(function() {
occupancy_block += ' ';
occupancy_block += '
';
occupancy_block += '';
- occupancy_block += '' + child_txt + ' ';
+ occupancy_block += '' + children_txt + ' ';
occupancy_block += ' (' + below_txt + ' ' + max_child_age + ' ' + years_txt + ')';
occupancy_block += '
';
occupancy_block += '';
diff --git a/modules/qloblockcontact/qloblockcontact.php b/modules/qloblockcontact/qloblockcontact.php
index c62d90851..a12c23973 100644
--- a/modules/qloblockcontact/qloblockcontact.php
+++ b/modules/qloblockcontact/qloblockcontact.php
@@ -41,8 +41,8 @@ class QloBlockContact extends Module
public function install()
{
if (!parent::install()
- || !Configuration::updateValue('QBC_PHONE', '')
- || !Configuration::updateValue('QBC_EMAIL', '')
+ || !Configuration::updateValue('QBC_PHONE', Configuration::get('WK_HOTEL_GLOBAL_CONTACT_NUMBER'))
+ || !Configuration::updateValue('QBC_EMAIL', Configuration::get('WK_HOTEL_GLOBAL_CONTACT_EMAIL'))
|| !$this->registerHook('actionFrontControllerSetMedia')
|| !$this->registerHook('displayNav')
|| !$this->registerHook('displayExternalNavigationHook')
diff --git a/modules/qlocleaner/qlocleaner.php b/modules/qlocleaner/qlocleaner.php
index 8f0e96393..c934346dd 100644
--- a/modules/qlocleaner/qlocleaner.php
+++ b/modules/qlocleaner/qlocleaner.php
@@ -204,11 +204,19 @@ class QloCleaner extends Module
switch ($case) {
case 'catalog':
- $id_home = Configuration::getMultiShopValues('PS_HOME_CATEGORY');
$id_root = Configuration::getMultiShopValues('PS_ROOT_CATEGORY');
- $db->execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE id_category NOT IN ('.implode(',', array_map('intval', $id_home)).', '.implode(',', array_map('intval', $id_root)).')');
- $db->execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE id_category NOT IN ('.implode(',', array_map('intval', $id_home)).', '.implode(',', array_map('intval', $id_root)).')');
- $db->execute('DELETE FROM `'._DB_PREFIX_.'category_shop` WHERE id_category NOT IN ('.implode(',', array_map('intval', $id_home)).', '.implode(',', array_map('intval', $id_root)).')');
+ $id_home = Configuration::getMultiShopValues('PS_HOME_CATEGORY');
+ $id_locations = Configuration::getMultiShopValues('PS_LOCATIONS_CATEGORY');
+ $id_services = Configuration::getMultiShopValues('PS_SERVICE_CATEGORY');
+
+ $not_in = implode(',', array_map('intval', $id_root)).','.
+ implode(',', array_map('intval', $id_home)).','.
+ implode(',', array_map('intval', $id_locations)).','.
+ implode(',', array_map('intval', $id_services));
+
+ $db->execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE id_category NOT IN ('.$not_in.')');
+ $db->execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE id_category NOT IN ('.$not_in.')');
+ $db->execute('DELETE FROM `'._DB_PREFIX_.'category_shop` WHERE id_category NOT IN ('.$not_in.')');
foreach (scandir(_PS_CAT_IMG_DIR_) as $dir) {
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $dir)) {
unlink(_PS_CAT_IMG_DIR_.$dir);
@@ -646,18 +654,17 @@ class QloCleaner extends Module
array('htl_features_block_data_lang', 'id_features_block', 'htl_features_block_data', 'id_features_block'),
array('cart_rule', 'id_customer', 'customer', 'id_customer'),
array('htl_testimonials_block_data_lang', 'id_testimonial_block', 'htl_testimonials_block_data', 'id_testimonial_block'),
- array('htl_room_type_global_demand', 'id_tax_rules_group', 'tax_rules_group', 'id_tax_rules_group'),
array('htl_room_type_global_demand_advance_option', 'id_global_demand', 'htl_room_type_global_demand', 'id_global_demand'),
+ array('htl_room_type_global_demand_advance_option_lang', 'id_lang', 'lang', 'id_lang'),
array('htl_room_type_global_demand_advance_option_lang', 'id_option', 'htl_room_type_global_demand_advance_option', 'id_option'),
array('htl_room_type_global_demand_lang', 'id_global_demand', 'htl_room_type_global_demand', 'id_global_demand'),
array('htl_branch_info_lang', 'id_lang', 'lang', 'id_lang'),
array('htl_branch_info_lang', 'id', 'htl_branch_info', 'id'),
array('htl_features_lang', 'id_lang', 'lang', 'id_lang'),
array('htl_features_lang', 'id', 'htl_features', 'id'),
+ array('htl_room_type_demand', 'id_global_demand', 'htl_room_type_global_demand', 'id_global_demand'),
array('htl_room_type_demand', 'id_product', 'product', 'id_product'),
array('htl_room_type_demand_price', 'id_product', 'product', 'id_product'),
- array('htl_room_type_global_demand_advance_option_lang', 'id_lang', 'lang', 'id_lang'),
- array('htl_room_type_global_demand_advance_option_lang', 'id_option', 'htl_room_type_global_demand_advance_option', 'id_option'),
array('htl_room_type_feature_pricing_group', 'id_group', 'group', 'id_group'),
array('htl_booking_demands_tax', 'id_tax', 'tax', 'id_tax'),
array('htl_booking_detail', 'id_product', 'product', 'id_product'),
diff --git a/modules/qlohotelreview/qlohotelreview.php b/modules/qlohotelreview/qlohotelreview.php
index a0319941e..2185bd243 100644
--- a/modules/qlohotelreview/qlohotelreview.php
+++ b/modules/qlohotelreview/qlohotelreview.php
@@ -171,7 +171,7 @@ class QloHotelReview extends Module
'admin_approval_enabled' => (int) Configuration::get('QHR_ADMIN_APPROVAL_ENABLED'),
'texts' => array(
'num_files' => sprintf(
- $this->l('You can upload a maximum of %d images.'),
+ $this->l('You can upload a maximum of %d images.', false, true),
(int) Configuration::get('QHR_MAX_IMAGES_PER_REVIEW')
),
),
diff --git a/modules/statsbestcategories/statsbestcategories.php b/modules/statsbestcategories/statsbestcategories.php
index 50b038743..56cba9222 100644
--- a/modules/statsbestcategories/statsbestcategories.php
+++ b/modules/statsbestcategories/statsbestcategories.php
@@ -152,6 +152,9 @@ class StatsBestCategories extends ModuleGrid
$date_between = $this->getDate();
$date_from = date('Y-m-d', strtotime($this->_employee->stats_date_from));
$date_to = date('Y-m-d', strtotime($this->_employee->stats_date_to));
+ if ($date_from == $date_to) {
+ $date_to = date('Y-m-d', strtotime('+1 day', strtotime($date_to)));
+ }
$id_lang = $this->getLang();
//If column 'order_detail.original_wholesale_price' does not exist, create it
diff --git a/modules/statsbestproducts/statsbestproducts.php b/modules/statsbestproducts/statsbestproducts.php
index 1d8449bfd..c0d7dd6ac 100644
--- a/modules/statsbestproducts/statsbestproducts.php
+++ b/modules/statsbestproducts/statsbestproducts.php
@@ -154,6 +154,9 @@ class StatsBestProducts extends ModuleGrid
$date_between = $this->getDate();
$date_from = date('Y-m-d', strtotime($this->_employee->stats_date_from));
$date_to = date('Y-m-d', strtotime($this->_employee->stats_date_to));
+ if ($date_from == $date_to) {
+ $date_to = date('Y-m-d', strtotime('+1 day', strtotime($date_to)));
+ }
$array_date_between = explode(' AND ', $date_between);
$id_lang = $this->getLang();
diff --git a/modules/wkabouthotelblock/controllers/admin/AdminAboutHotelBlockSettingController.php b/modules/wkabouthotelblock/controllers/admin/AdminAboutHotelBlockSettingController.php
index f6c973b30..8ffe12603 100644
--- a/modules/wkabouthotelblock/controllers/admin/AdminAboutHotelBlockSettingController.php
+++ b/modules/wkabouthotelblock/controllers/admin/AdminAboutHotelBlockSettingController.php
@@ -397,7 +397,7 @@ class AdminAboutHotelBlockSettingController extends ModuleAdminController
parent::setMedia();
Media::addJsDef(
array(
- 'filesizeError' => $this->l('File exceeds maximum size.'),
+ 'filesizeError' => $this->l('File exceeds maximum size.', null, true),
'maxSizeAllowed' => Tools::getMaxUploadSize(),
)
);
diff --git a/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css b/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css
index 685225d8d..f7ebce57a 100644
--- a/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css
+++ b/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css
@@ -40,6 +40,8 @@
}
.interiorboxInner img {
width: 100%;
+ height: 100%;
+ object-fit: cover;
}
.htlInterior-owlCarousel .owl-prev, .htlInterior-owlCarousel .owl-next{
font-size: 40px;
diff --git a/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php b/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php
index 5577e9fc0..510e448c7 100644
--- a/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php
+++ b/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php
@@ -428,7 +428,7 @@ class AdminFeaturesModuleSettingController extends ModuleAdminController
parent::setMedia();
Media::addJsDef(
array(
- 'filesizeError' => $this->l('File exceeds maximum size.'),
+ 'filesizeError' => $this->l('File exceeds maximum size.', null, true),
'maxSizeAllowed' => Tools::getMaxUploadSize(),
)
);
diff --git a/modules/wkhotelfilterblock/wkhotelfilterblock.php b/modules/wkhotelfilterblock/wkhotelfilterblock.php
index 21d094a29..8f6dafcd6 100644
--- a/modules/wkhotelfilterblock/wkhotelfilterblock.php
+++ b/modules/wkhotelfilterblock/wkhotelfilterblock.php
@@ -66,7 +66,7 @@ class wkhotelfilterblock extends Module
$htl_id_category = Tools::getValue('id_category');
if (Validate::isLoadedObject($objCategory = new Category((int) $htl_id_category))) {
if ($objCategory->hasParent(Configuration::get('PS_LOCATIONS_CATEGORY'))) {
- Media::addJsDef(array('noRoomAvailTxt' => $this->l('No room available')));
+ Media::addJsDef(array('noRoomAvailTxt' => $this->l('No room available', false, true)));
$this->context->controller->addJS($this->_path.'/views/js/wkhotelfilterblock.js');
$this->context->controller->addCSS($this->_path.'/views/css/wkhotelfilterblock.css');
diff --git a/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php b/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php
index ea14b1bca..7ab3d7138 100644
--- a/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php
+++ b/modules/wkroomsearchblock/classes/WkRoomSearchHelper.php
@@ -183,16 +183,20 @@ class WkRoomSearchHelper
if ($occupancyEnabled) {
// send occupancy information searched by the user
- if ($searchedData['occupancies'] = Tools::getvalue('occupancy')) {
- $searchedData['occupancy_adults'] = array_sum(
- array_column($searchedData['occupancies'], 'adults')
- );
- $searchedData['occupancy_children'] = array_sum(
- array_column($searchedData['occupancies'], 'children')
- );
- $searchedData['occupancy_child_ages'] = array_sum(
- array_column($searchedData['occupancies'], 'child_ages')
- );
+ if ($occupancies = Tools::getvalue('occupancy')) {
+ if (Validate::isOccupancy($occupancies)) {
+ if ($searchedData['occupancies'] = $occupancies) {
+ $searchedData['occupancy_adults'] = array_sum(
+ array_column($searchedData['occupancies'], 'adults')
+ );
+ $searchedData['occupancy_children'] = array_sum(
+ array_column($searchedData['occupancies'], 'children')
+ );
+ $searchedData['occupancy_child_ages'] = array_sum(
+ array_column($searchedData['occupancies'], 'child_ages')
+ );
+ }
+ }
}
}
$smartyVars['search_data'] = $searchedData;
diff --git a/modules/wkroomsearchblock/views/css/wk-global-search.css b/modules/wkroomsearchblock/views/css/wk-global-search.css
index 155e843b7..8234891ea 100644
--- a/modules/wkroomsearchblock/views/css/wk-global-search.css
+++ b/modules/wkroomsearchblock/views/css/wk-global-search.css
@@ -172,7 +172,8 @@
.header-rmsearch-wrapper .label-desc-txt {
font-size: 12px;
- color: #777777;}
+ color: #777777;
+ margin: 0;}
.header-rmsearch-wrapper .btn {
font-weight: 600;}
.header-rmsearch-wrapper .btn-primary {
diff --git a/modules/wkroomsearchblock/views/js/wk-room-search-block.js b/modules/wkroomsearchblock/views/js/wk-room-search-block.js
index 74faaa85f..0208e51e0 100644
--- a/modules/wkroomsearchblock/views/js/wk-room-search-block.js
+++ b/modules/wkroomsearchblock/views/js/wk-room-search-block.js
@@ -367,7 +367,7 @@ $(document).ready(function() {
occupancy_block += '';
occupancy_block += '';
occupancy_block += '