diff --git a/controllers/front/OrderConfirmationController.php b/controllers/front/OrderConfirmationController.php index 8c63c8907..a60326859 100644 --- a/controllers/front/OrderConfirmationController.php +++ b/controllers/front/OrderConfirmationController.php @@ -175,6 +175,7 @@ class OrderConfirmationControllerCore extends FrontController $order_bk_data = $obj_htl_bk_dtl->getOnlyOrderBookingData($idOrder, $customer->id_guest, $type_value['product_id']); } if ($rm_dtl = $obj_rm_type->getRoomTypeInfoByIdProduct($type_value['product_id'])) { + $cart_htl_data[$type_key]['id_order'] = $idOrder; $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]['adults'] = $rm_dtl['adults']; @@ -366,9 +367,6 @@ class OrderConfirmationControllerCore extends FrontController } } - if (!empty($cart_htl_data)) { - $this->context->smarty->assign('cart_htl_data', $cart_htl_data); - } if (!empty($cart_service_products)) { $this->context->smarty->assign('cart_service_products', $cart_service_products); } @@ -399,6 +397,10 @@ class OrderConfirmationControllerCore extends FrontController $this->context->smarty->assign('orders_has_invoice', $orders_has_invoice); } + if (!empty($cart_htl_data)) { + $this->context->smarty->assign('cart_htl_data', $cart_htl_data); + } + $shw_bo_msg = Configuration::get('WK_SHOW_MSG_ON_BO'); $bo_msg = Configuration::get('WK_BO_MESSAGE'); $this->context->smarty->assign( @@ -469,6 +471,8 @@ class OrderConfirmationControllerCore extends FrontController parent::setMedia(); $this->addCSS(_THEME_CSS_DIR_.'history.css'); $this->addJS(_THEME_JS_DIR_.'history.js'); + $this->addJS(_THEME_JS_DIR_.'order-confirmation.js'); + $this->addCSS(_THEME_CSS_DIR_.'order-confirmation.css'); $this->addJqueryPlugin(array('fancybox')); //fancybox not found for some client theme $this->addJqueryUI('ui.tooltip', 'base', true); } diff --git a/themes/hotel-reservation-theme/css/order-confirmation.css b/themes/hotel-reservation-theme/css/order-confirmation.css new file mode 100644 index 000000000..654658b95 --- /dev/null +++ b/themes/hotel-reservation-theme/css/order-confirmation.css @@ -0,0 +1,193 @@ +/** + * 2010-2023 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-2023 Webkul IN + * @license LICENSE.txt + */ + +.fancybox-wrap.fancybox-extra-services .card { + width: 650px; + margin-bottom: 0; +} + +.fancybox-wrap.fancybox-extra-services .fancybox-close { + background: none; + top: 12px; + right: 12px; + font-size: 32px; +} + +.fancybox-wrap.fancybox-extra-services .fancybox-close:after { + content: '\00D7'; + color: #333; +} +.fancybox-wrap.fancybox-extra-services .card-body { + padding: 0; + max-height: 70vh; + overflow: auto; +} + +.card { + padding: 0; + border-radius: 4px; + border: 1px solid #E5E5E5; + background: #FFF; + box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.10); + color: #333; +} +.card .card-header { + padding: 14px 18px; + margin-bottom: 0; + border-bottom: 1px solid #E5E5E5; + font-size: 19px; + font-weight: bold; + line-height: 27px; +} + +.card.card-toolbar .card-header { + padding: 8px 18px; +} + +.card .card-subheader { + margin-bottom: 0; + font-size: 14px; + font-weight: normal; +} + +.card .card-body { + padding: 18px; +} + +.card .card-body .card-title { + margin: 0; + font-size: 18px; + font-weight: bold; +} + +.card .card-body .card-subtitle { + margin: 0; + margin-bottom: 8px; + font-size: 16px; + font-weight: bold; +} + +.card .card-body .card-text { + font-size: 14px; + line-height: 26px; +} + +/* card-tabs - start */ +.card.card-tabs .nav-tabs { + border: none; +} + +.card.card-tabs .nav-tabs li > a { + padding: 0 18px; + border: none; + color: #333; +} + +.card.card-tabs .nav-tabs li.active:after { + content: ''; + position: absolute; + top: 39px; + width: 100%; + height: 2px; + background: #379aef; +} + +.card.card-tabs .tab-content { + margin-top: 0; +} +/* card-tabs - end */ + +#rooms_extra_services .nav-tabs { + border-bottom: none; +} + +#rooms_extra_services .nav-tabs > li { + width: 50%; + text-align: center; + margin: 0; +} + +#rooms_extra_services .nav-tabs > li > a { + border: none; + margin: 0; + font-size: 14px; + font-weight: bold; + color: #333; +} + +#rooms_extra_services .nav-tabs > li.active { + border-bottom: 1px solid #1292FF; +} + +#rooms_extra_services .nav-tabs > li.active > a { + color: #1292FF; +} + +#rooms_extra_services .nav-tabs > li:not(.active) { + border-bottom: 1px solid #F0F0F0; +} + +#rooms_extra_services .tab-content { + margin-top: 0; + padding: 0; + padding-bottom: 15px; +} + +#rooms_extra_services .tab-content .rooms_extra_demands_head { + padding: 10px 18px; + border-bottom: 1px solid #F0F0F0; +} + +#rooms_extra_services .tab-content .rooms_extra_demands_text { + font-size: 12px; + margin-bottom: 0; +} + +#rooms_extra_services .tab-content .room_demands { + padding: 0 18px; + margin-top: 20px; +} + +#rooms_extra_services .tab-content .demand_header { + font-size: 16px; + font-weight: bold; + line-height: 24px; + margin-bottom: 10px; +} + +#rooms_extra_services .tab-content .room_demand_detail { + font-size: 14px; + font-weight: 500; + margin-top: 0; + padding-top: 0; + border-top: unset; +} + +#rooms_extra_services .tab-content .room_demand_block { + display: flex; + justify-content: space-between; +} + +#rooms_extra_services .tab-content .room_demand_block:not(:last-of-type) { + margin-bottom: 12px; +} + +#rooms_extra_services .nav-tabs > li.active:after { + content: unset; +} \ No newline at end of file diff --git a/themes/hotel-reservation-theme/js/order-confirmation.js b/themes/hotel-reservation-theme/js/order-confirmation.js new file mode 100644 index 000000000..7b4359cf6 --- /dev/null +++ b/themes/hotel-reservation-theme/js/order-confirmation.js @@ -0,0 +1,73 @@ +/** +* 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 +*/ + +$(document).ready(function(){ + $(document).off('click').on('click', '.open_rooms_extra_services_panel', function(e) { + var idProduct = $(this).data('id_product'); + var idOrder = $(this).data('id_order'); + var dateFrom = $(this).data('date_from'); + var dateTo = $(this).data('date_to'); + var action = $(this).data('action'); + $.ajax({ + type: 'POST', + headers: { + "cache-control": "no-cache" + }, + url: action, + dataType: 'json', + cache: false, + data: { + date_from: dateFrom, + date_to: dateTo, + id_product: idProduct, + id_order: idOrder, + action: 'getRoomTypeBookingDemands', + method: 'getRoomTypeBookingDemands', + ajax: true, + token: static_token + }, + success: function(result) { + if (result.extra_demands) { + $('#rooms_extra_services').html(''); + $('#rooms_extra_services').append(result.extra_demands); + } + $.fancybox({ + href: "#rooms_extra_services", + autoSize : true, + autoScale : true, + maxWidth : '100%', + wrapCSS: 'fancybox-extra-services', + padding: 0, + helpers: { + overlay: { + css : {background: 'rgba(0, 0, 0, 0.8)'} + } + }, + 'hideOnContentClick': false, + afterClose: function() { + if (result.reload) { + // reload so that changes prices will reflect everywhere + location.reload(); + } + }, + }); + }, + }); + }); +}); \ No newline at end of file diff --git a/themes/hotel-reservation-theme/order-confirmation.tpl b/themes/hotel-reservation-theme/order-confirmation.tpl index fcbe91d71..f1da8db68 100644 --- a/themes/hotel-reservation-theme/order-confirmation.tpl +++ b/themes/hotel-reservation-theme/order-confirmation.tpl @@ -111,7 +111,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=$objOrderCurrency}