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} {/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 += ''; + occupancy_block += ''; 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 += '
'; - occupancy_block += ''; + occupancy_block += ''; occupancy_block += '
'; occupancy_block += ''; occupancy_block += '
'; diff --git a/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl b/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl index 9ce48c347..86605eec5 100644 --- a/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl +++ b/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl @@ -93,7 +93,7 @@
- +
@@ -158,7 +158,7 @@
- +
diff --git a/modules/wkroomsearchblock/wkroomsearchblock.php b/modules/wkroomsearchblock/wkroomsearchblock.php index 256d0d15f..e959bf65d 100644 --- a/modules/wkroomsearchblock/wkroomsearchblock.php +++ b/modules/wkroomsearchblock/wkroomsearchblock.php @@ -61,26 +61,26 @@ class WkRoomSearchBlock extends Module 'wkroomsearchblock', 'autocompletesearch' ), - 'no_results_found_cond' => $this->l('No results found for this search'), - 'hotel_name_cond' => $this->l('Please select a hotel name'), - 'check_in_time_cond' => $this->l('Please enter Check In time'), - 'check_out_time_cond' => $this->l('Please enter Check Out time'), - 'less_checkin_date' => $this->l('Check In date can not be before current date.'), - 'more_checkout_date' => $this->l('Check Out date must be greater than Check In date.'), - 'select_htl_txt' => $this->l('Select Hotel'), - 'select_age_txt' => $this->l('Select age'), - 'under_1_age' => $this->l('Under 1'), - 'room_txt' => $this->l('Room'), - 'rooms_txt' => $this->l('Rooms'), - 'remove_txt' => $this->l('Remove'), - 'adult_txt' => $this->l('Adult'), - 'adults_txt' => $this->l('Adults'), - 'child_txt' => $this->l('Child'), - 'children_txt' => $this->l('Children'), - 'below_txt' => $this->l('Below'), - 'years_txt' => $this->l('years'), - 'all_children_txt' => $this->l('All Children'), - 'invalid_occupancy_txt' => $this->l('Invalid occupancy(adults/children) found.'), + 'no_results_found_cond' => $this->l('No results found for this search', false, true), + 'hotel_name_cond' => $this->l('Please select a hotel name', false, true), + 'check_in_time_cond' => $this->l('Please enter Check In time', false, true), + 'check_out_time_cond' => $this->l('Please enter Check Out time', false, true), + 'less_checkin_date' => $this->l('Check In date can not be before current date.', false, true), + 'more_checkout_date' => $this->l('Check Out date must be greater than Check In date.', false, true), + 'select_htl_txt' => $this->l('Select Hotel', false, true), + 'select_age_txt' => $this->l('Select age', false, true), + 'under_1_age' => $this->l('Under 1', false, true), + 'room_txt' => $this->l('Room', false, true), + 'rooms_txt' => $this->l('Rooms', false, true), + 'remove_txt' => $this->l('Remove', false, true), + 'adult_txt' => $this->l('Adult', false, true), + 'adults_txt' => $this->l('Adults', false, true), + 'child_txt' => $this->l('Child', false, true), + 'children_txt' => $this->l('Children', false, true), + 'below_txt' => $this->l('Below', false, true), + 'years_txt' => $this->l('years', false, true), + 'all_children_txt' => $this->l('All Children', false, true), + 'invalid_occupancy_txt' => $this->l('Invalid occupancy(adults/children) found.', false, true), ) ); } diff --git a/modules/wktestimonialblock/controllers/admin/AdminTestimonialsModuleSettingController.php b/modules/wktestimonialblock/controllers/admin/AdminTestimonialsModuleSettingController.php index 83c2c9c19..2bffd0fd9 100644 --- a/modules/wktestimonialblock/controllers/admin/AdminTestimonialsModuleSettingController.php +++ b/modules/wktestimonialblock/controllers/admin/AdminTestimonialsModuleSettingController.php @@ -406,7 +406,7 @@ class AdminTestimonialsModuleSettingController 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/themes/hotel-reservation-theme/css/category.css b/themes/hotel-reservation-theme/css/category.css index d9a7fba5e..2e47c512e 100644 --- a/themes/hotel-reservation-theme/css/category.css +++ b/themes/hotel-reservation-theme/css/category.css @@ -251,10 +251,10 @@ p.capa_txt { .booking_guest_occupancy_conatiner { display: flex; } -.booking_guest_occupancy_conatiner .booking_occupancy_wrapper { - left: unset; -} @media (min-width: 992px) { + .booking_guest_occupancy_conatiner .booking_occupancy_wrapper { + left: unset; + } .room_features_cont > div { display: flex; flex-wrap: wrap; diff --git a/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css b/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css index f4fc05baa..35e18d341 100644 --- a/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css +++ b/themes/hotel-reservation-theme/css/modules/blockcart/blockcart.css @@ -226,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 { diff --git a/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js b/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js index b23f26b68..01bb0f3a4 100644 --- a/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js +++ b/themes/hotel-reservation-theme/js/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/themes/hotel-reservation-theme/js/occupancy.js b/themes/hotel-reservation-theme/js/occupancy.js index f901b0d78..b50060688 100644 --- a/themes/hotel-reservation-theme/js/occupancy.js +++ b/themes/hotel-reservation-theme/js/occupancy.js @@ -228,7 +228,7 @@ $(document).ready(function(){ occupancy_block += '
'; occupancy_block += '
'; occupancy_block += '
'; - occupancy_block += ''; + occupancy_block += ''; occupancy_block += '
'; occupancy_block += ''; occupancy_block += '
'; diff --git a/themes/hotel-reservation-theme/js/order-opc.js b/themes/hotel-reservation-theme/js/order-opc.js index 45e846505..bc79fef42 100644 --- a/themes/hotel-reservation-theme/js/order-opc.js +++ b/themes/hotel-reservation-theme/js/order-opc.js @@ -35,38 +35,40 @@ $(document).ready(function() // room price details tooltip if ($('.room_price_detail_block .room-price-detail').length) { - $('.room_price_detail_block .room-price-detail img').tooltip({ - content: $('.room_price_detail_block .room-price-detail-container').html(), - items: "span", - trigger : 'hover', - tooltipClass: "room-price-detail-tooltip", - open: function(event, ui) - { - if (typeof(event.originalEvent) === 'undefined') + $('.room_price_detail_block .room-price-detail').each(function (i, element) { + $(this).find('img').tooltip({ + content: $(this).closest('.price_block').find('.room-price-detail-container').html(), + items: "span", + trigger : 'hover', + tooltipClass: "room-price-detail-tooltip", + open: function(event, ui) { - return false; - } - - var $id = $(ui.tooltip).attr('id'); - - if ($('div.ui-tooltip').not('#' + $id).length) { - return false; - } - }, - close: function(event, ui) - { - ui.tooltip.hover(function() - { - $(this).stop(true).fadeTo(400, 1); - }, - function() - { - $(this).fadeOut('400', function() + if (typeof(event.originalEvent) === 'undefined') { - $(this).remove(); + return false; + } + + var $id = $(ui.tooltip).attr('id'); + + if ($('div.ui-tooltip').not('#' + $id).length) { + return false; + } + }, + close: function(event, ui) + { + ui.tooltip.hover(function() + { + $(this).stop(true).fadeTo(400, 1); + }, + function() + { + $(this).fadeOut('400', function() + { + $(this).remove(); + }); }); - }); - } + } + }); }); } diff --git a/themes/hotel-reservation-theme/js/product.js b/themes/hotel-reservation-theme/js/product.js index d2b8bb6fc..bf1139758 100644 --- a/themes/hotel-reservation-theme/js/product.js +++ b/themes/hotel-reservation-theme/js/product.js @@ -1350,8 +1350,10 @@ var BookingForm = { } if (!$('.max_avail_type_qty').length || $('.max_avail_type_qty').val() < 1) { disableRoomTypeDemands(1); + disableRoomTypeServices(1); } else { disableRoomTypeDemands(0); + disableRoomTypeServices(0); } }, initDatepicker: function(max_order_date, preparation_time, dateFrom, dateTo) { @@ -1359,6 +1361,14 @@ var BookingForm = { if (preparation_time) { start_date.setDate(start_date.getDate() + parseInt(preparation_time)); start_date.setHours(0, 0, 0, 0); + if (dateFrom && new Date(dateFrom + ' 00:00:00') < start_date) { + dateFrom = $.datepicker.formatDate('yy-mm-dd', start_date); + if (new Date(dateTo + ' 00:00:00') <= start_date) { + dateTo = new Date(start_date); + dateTo.setDate(start_date.getDate() + 1); + dateTo = $.datepicker.formatDate('yy-mm-dd', dateTo); + } + } } if (max_order_date) { @@ -1382,7 +1392,6 @@ var BookingForm = { max_order_date = $.datepicker.formatDate('dd-mm-yy', max_order_date); } $('#room_date_range').dateRangePicker({ - startDate: $.datepicker.formatDate('dd-mm-yy', new Date()), endDate: max_order_date, startDate: start_date, }).on('datepicker-change', function(event,obj){ diff --git a/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl b/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl index 6c64c9c3b..bbeb68201 100644 --- a/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl +++ b/themes/hotel-reservation-theme/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/themes/hotel-reservation-theme/order-detail.tpl b/themes/hotel-reservation-theme/order-detail.tpl index 532599299..96af48089 100644 --- a/themes/hotel-reservation-theme/order-detail.tpl +++ b/themes/hotel-reservation-theme/order-detail.tpl @@ -414,7 +414,7 @@ {if (isset($rm_v['extra_demands']) && $rm_v['extra_demands']) || isset($rm_v['additional_services']) && $rm_v['additional_services']} - + {/if} {if $group_use_tax} {displayWtPriceWithCurrency price=($rm_v['extra_demands_price_ti'] + $rm_v['additional_services_price_ti']) currency=$currency}