diff --git a/admin/themes/default/sass/admin-theme.sass b/admin/themes/default/sass/admin-theme.sass index 33b4084b0..1e196b8df 100644 --- a/admin/themes/default/sass/admin-theme.sass +++ b/admin/themes/default/sass/admin-theme.sass @@ -108,6 +108,8 @@ @import "partials/select2" @import "partials/ndv3" +@import "partials/tooltip" + //Backward compatibility @import "partials/backward" diff --git a/admin/themes/default/sass/admin-theme_rtl.sass b/admin/themes/default/sass/admin-theme_rtl.sass index 712d08aa9..63af964be 100644 --- a/admin/themes/default/sass/admin-theme_rtl.sass +++ b/admin/themes/default/sass/admin-theme_rtl.sass @@ -112,6 +112,8 @@ //RTL @import "partials/rtl" +@import "partials/tooltip" + //Backward compatibility @import "partials/backward" diff --git a/admin/themes/default/sass/partials/_tooltip.sass b/admin/themes/default/sass/partials/_tooltip.sass new file mode 100644 index 000000000..986d49667 --- /dev/null +++ b/admin/themes/default/sass/partials/_tooltip.sass @@ -0,0 +1,30 @@ +.tooltip_cont + min-width: 280px + width: 100% + font-size: 14px + font-weight: 600 + .tip_header + margin-bottom: 10px + .tip-body > div + margin-bottom: 6px + +.tip_element_head + font-size: 12px + +.tip_element_value + font-size: 14px + font-weight: 400 + opacity: 0.8 + +.tip-body + display: grid + grid-template-columns: auto auto + &.tip-body-grid + grid-template-columns: 1fr 1fr + gap: 8px 16px + +.ui-tooltip, +.ui-tooltip.ui-widget-content + border: none + padding: 10px + box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.15) diff --git a/admin/themes/default/template/controllers/carts/helpers/view/view.tpl b/admin/themes/default/template/controllers/carts/helpers/view/view.tpl index a57ed0a63..b26103a19 100644 --- a/admin/themes/default/template/controllers/carts/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/carts/helpers/view/view.tpl @@ -26,9 +26,7 @@ {extends file="helpers/view/view.tpl"} {block name="override_tpl"} -
- {$kpi} -
+
diff --git a/admin/themes/default/template/controllers/languages/helpers/form/form.tpl b/admin/themes/default/template/controllers/languages/helpers/form/form.tpl index 8d1dc403e..77baa0e70 100644 --- a/admin/themes/default/template/controllers/languages/helpers/form/form.tpl +++ b/admin/themes/default/template/controllers/languages/helpers/form/form.tpl @@ -69,11 +69,11 @@
{foreach $list.files as $key => $file} {if !file_exists($key)} - + {/if} {$key} {if !file_exists($key)} - + {/if}
{/foreach} diff --git a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl index e3405fa99..083021418 100644 --- a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl +++ b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl @@ -51,7 +51,12 @@ {assign var=curr_id value=$cart->id_currency|intval} {foreach from=$cart_detail_data item=data} - {$data.room_num|escape:'html':'UTF-8'} {hook h='displayRoomNumAfter' data=$data type='adminOrder'} + {$data.room_num|escape:'html':'UTF-8'} + {if isset($data['connected_rooms'][$data.id_room])} + {include file="controllers/products/connected-rooms.tpl" htl_connected_rooms=$data['connected_rooms'][$data.id_room]} + {/if} + + {hook h='displayRoomNumAfter' data=$data type='adminOrder'}

{$data.room_type|escape:'html':'UTF-8'}

@@ -130,7 +135,7 @@ {* {displayPrice price=$data.amt_with_qty} *} - {if (isset($data.extra_demands) && $data.extra_demands) || (isset($data.additional_service) && $data.additional_service)} + {if (isset($data.extra_demands) && $data.extra_demands) || (isset($data.additional_service) && $data.additional_service) || (isset($data.selected_services) && $data.selected_services)} {displayPrice price=($data.amt_with_qty + $data.additional_services_auto_add_price + $data.demand_price + $data.additional_service_price)|escape:'html':'UTF-8'} {else} {displayPrice price=$data.amt_with_qty|escape:'html':'UTF-8'} diff --git a/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl b/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl index 935498f70..3e5b1cc48 100644 --- a/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl +++ b/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl @@ -117,7 +117,7 @@ {l s='Delete'} {else} -
+
{*
-
-
-
- {/if}
 {l s='Order'} diff --git a/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl index 12058bee8..7c94bc5d0 100644 --- a/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl @@ -43,7 +43,7 @@
- +
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded} @@ -55,7 +55,7 @@
- +
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded} diff --git a/admin/themes/default/template/controllers/products/configuration.tpl b/admin/themes/default/template/controllers/products/configuration.tpl index 7f0bc0f60..606a9a2d3 100644 --- a/admin/themes/default/template/controllers/products/configuration.tpl +++ b/admin/themes/default/template/controllers/products/configuration.tpl @@ -67,6 +67,14 @@ + + + {hook h='displayHotelRoomListTableHeaderColumn'} {l s='--'} @@ -108,6 +116,21 @@ {* Since the data can also be used from post incase of errors, which will cause issues with the id index *} + + {if isset($room_info['id'])} + + + + + {if isset($room_info['connected_rooms_count'])}{$room_info['connected_rooms_count']|intval}{else}0{/if} + + + + {/if} + {if isset($room_info['id'])} {hook h='displayHotelRoomListTableRowColumn' index=$key id_room=$room_info['id']} {else} @@ -343,6 +366,7 @@
+ {assign var="connected_room_types" value=[]} + {if isset($htl_connected_rooms[$main_room_id].connected_room_types)} + {assign var="connected_room_types" value=$htl_connected_rooms[$main_room_id].connected_room_types} + {/if} + +
+
+
+
+ + + + + + + + + + {foreach from=$connected_room_types item=typeGroup} + {foreach from=$typeGroup.connected_rooms item=room} + + + + + + {/foreach} + {/foreach} + +
{l s='Room Type'}{l s='Connected Room'} + {l s='Action'} +
{$typeGroup.room_type_name|escape:'html':'UTF-8'}{$room.name|escape:'html':'UTF-8'} + + + +
+
+
+
+ + {l s='No connected rooms.'} +
+
+
+ {if isset($htl_not_connected_rooms) && $htl_not_connected_rooms|count > 0} + + {/if} +
+
+ {if isset($htl_not_connected_rooms) && $htl_not_connected_rooms|count > 0} + + + + + + + + +
+ + + + + + +
+ {/if} +
diff --git a/classes/Cart.php b/classes/Cart.php index ad5ee4302..d7421ec7d 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -1833,7 +1833,7 @@ class CartCore extends ObjectModel $this->id, [], 0, - isset($product['id_hotel_cart_booking']) ? $product['id_hotel_cart_booking'] : null, + null, null, (int)$product['id_product'], null, @@ -1862,53 +1862,55 @@ class CartCore extends ObjectModel // by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices.... $totalPriceByProduct = 0; $priceDisplay = Group::getPriceDisplayMethod(Group::getCurrent()->id); - foreach ($roomTypesByIdProduct as $key => $cartRoomInfo) { - $occupancy = array( - array( - 'adults' => $cartRoomInfo['adults'], - 'children' => $cartRoomInfo['children'], - 'child_ages' => json_decode($cartRoomInfo['child_ages']) - ) + + if ($type == Cart::ADVANCE_PAYMENT || $type == Cart::ADVANCE_PAYMENT_ONLY_PRODUCTS) { + // getProductMinAdvPaymentAmountByIdCart already aggregates all rooms for this product internally, + // so call it once and add once — not inside the per-room loop. + $advProductPrice = $objAdvPayment->getProductMinAdvPaymentAmountByIdCart( + $this->id, + $product['id_product'], + 0, + 0, + $with_taxes ); - // get the real price of the room type - $roomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( - $cartRoomInfo['id_product'], - $cartRoomInfo['date_from'], - $cartRoomInfo['date_to'], - $occupancy, - Group::getCurrent()->id, - $cartRoomInfo['id_cart'], - $cartRoomInfo['id_guest'], - $cartRoomInfo['id_room'], - 0 - ); - if ($with_taxes) { - $totalPriceByProduct = $roomTotalPrice['total_price_tax_incl']; - } else { - $totalPriceByProduct = $roomTotalPrice['total_price_tax_excl']; - } - - // If customer has selected advance payment of the cart - if ($type == Cart::ADVANCE_PAYMENT || $type == Cart::ADVANCE_PAYMENT_ONLY_PRODUCTS) { - $advProductPrice = $objAdvPayment->getProductMinAdvPaymentAmountByIdCart( - $this->id, - $cartRoomInfo['id_product'], - 0, - 0, - $with_taxes - ); - - // set advance payment price only if it is greater than real price - if ($advProductPrice < $totalPriceByProduct) { - $totalPriceByProduct = $advProductPrice; - } - } - - // Rounding as per configurations if ($ps_round_type == Order::ROUND_TOTAL) { - $products_total[$id_tax_rules_group.'_'.$id_address] += Tools::processPriceRounding($totalPriceByProduct); + $products_total[$id_tax_rules_group.'_'.$id_address] += Tools::processPriceRounding($advProductPrice); } else { - $products_total[$id_tax_rules_group] += Tools::processPriceRounding($totalPriceByProduct); + $products_total[$id_tax_rules_group] += Tools::processPriceRounding($advProductPrice); + } + } else { + foreach ($roomTypesByIdProduct as $key => $cartRoomInfo) { + $occupancy = array( + array( + 'adults' => $cartRoomInfo['adults'], + 'children' => $cartRoomInfo['children'], + 'child_ages' => json_decode($cartRoomInfo['child_ages']) + ) + ); + // get the real price of the room type + $roomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice( + $cartRoomInfo['id_product'], + $cartRoomInfo['date_from'], + $cartRoomInfo['date_to'], + $occupancy, + Group::getCurrent()->id, + $cartRoomInfo['id_cart'], + $cartRoomInfo['id_guest'], + $cartRoomInfo['id_room'], + 0 + ); + if ($with_taxes) { + $totalPriceByProduct = $roomTotalPrice['total_price_tax_incl']; + } else { + $totalPriceByProduct = $roomTotalPrice['total_price_tax_excl']; + } + + // Rounding as per configurations + if ($ps_round_type == Order::ROUND_TOTAL) { + $products_total[$id_tax_rules_group.'_'.$id_address] += Tools::processPriceRounding($totalPriceByProduct); + } else { + $products_total[$id_tax_rules_group] += Tools::processPriceRounding($totalPriceByProduct); + } } } } diff --git a/classes/SpecificPrice.php b/classes/SpecificPrice.php index 1dd3829a2..79c63995e 100644 --- a/classes/SpecificPrice.php +++ b/classes/SpecificPrice.php @@ -367,12 +367,12 @@ class SpecificPriceCore extends ObjectModel `id_shop` '.self::formatIntInQuery(0, $id_shop).' AND `id_currency` '.self::formatIntInQuery(0, $id_currency).' AND `id_country` '.self::formatIntInQuery(0, $id_country). - ' AND `id_htl_cart_booking`='.(int)$id_htl_cart_booking.' '. + ' AND `id_htl_cart_booking` '.self::formatIntInQuery(0, $id_htl_cart_booking).' '. (Group::isFeatureActive() ? ' AND `id_group` '.self::formatIntInQuery(0, $id_group) : '').' '.$query_extra.' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= '; $query .= (Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION') || !$id_cart || !$real_quantity) ? (int)$quantity : max(1, (int)$real_quantity); - $query .= ' ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC, `to` DESC, `from` DESC'; + $query .= ' ORDER BY `id_htl_cart_booking` DESC, `id_product_attribute` DESC, `from_quantity` DESC, `score` DESC, `to` DESC, `from` DESC'; SpecificPrice::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); } diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index bdf2d3f74..9166f1750 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -2010,7 +2010,9 @@ class AdminControllerCore extends Controller } if ($conf = Tools::getValue('conf')) { - $this->context->smarty->assign('conf', $this->json ? json_encode($this->_conf[(int)$conf]) : $this->_conf[(int)$conf]); + if (isset($this->_conf[$conf])) { + $this->context->smarty->assign('conf', $this->json ? json_encode($this->_conf[(int)$conf]) : $this->_conf[(int)$conf]); + } } foreach (array('errors', 'warnings', 'informations', 'confirmations') as $type) { diff --git a/classes/pdf/HTMLTemplateBookingVoucher.php b/classes/pdf/HTMLTemplateBookingVoucher.php new file mode 100644 index 000000000..c4e5d17df --- /dev/null +++ b/classes/pdf/HTMLTemplateBookingVoucher.php @@ -0,0 +1,396 @@ +order = $order; + $this->smarty = $smarty; + $this->date = Tools::displayDate(date('Y-m-d')); + $this->title = sprintf(self::l('Booking Voucher - %s'), $this->order->reference); + $this->shop = new Shop((int)$this->order->id_shop); + } + + /** + * @return string HTML header + */ + public function getHeader() + { + $this->assignCommonHeaderData(); + $this->smarty->assign(array('header' => self::l('Booking Voucher'))); + + return $this->smarty->fetch($this->getTemplate('header')); + } + + /** + * Assembles all voucher data inline and renders the template. + * + * @return string HTML content + */ + public function getContent() + { + // --- Bookings --- + $objHotelBookingDetail = new HotelBookingDetail(); + $bookings = $objHotelBookingDetail->getBookingDataByOrderId((int)$this->order->id); + if (!is_array($bookings)) { + $bookings = array(); + } + + // --- Order state --- + $orderState = $this->order->getCurrentStateFull((int)$this->order->id_lang); + + // --- Hotel / property --- + $objHotel = null; + $idHotel = HotelBookingDetail::getIdHotelByIdOrder((int)$this->order->id); + if ($idHotel) { + $objHotel = new HotelBranchInformation((int)$idHotel, (int)$this->order->id_lang); + if (!Validate::isLoadedObject($objHotel)) { + $objHotel = null; + } + } + + $hotelAddress = ''; + $paymentPolicy = ''; + $cancellationPolicy = ''; + + if ($objHotel) { + $policies = is_array($objHotel->policies) ? '' : (string)$objHotel->policies; + if ($policies) { + $policyText = html_entity_decode($policies, ENT_QUOTES, 'UTF-8'); + $policyText = preg_replace('//i', "\n", $policyText); + $policyText = strip_tags($policyText); + $policyText = preg_replace("/[\r\n]+/", "\n", $policyText); + $paymentPolicy = nl2br(trim($policyText)); + } + + $objBranchRefundRules = new HotelBranchRefundRules(); + $refundRules = $objBranchRefundRules->getHotelRefundRules( + (int)$objHotel->id, 0, 1, (int)$this->order->id_lang, 1 + ); + if (is_array($refundRules) && !empty($refundRules)) { + $policyBlocks = array(); + foreach ($refundRules as $rule) { + $ruleName = isset($rule['name']) ? trim(strip_tags($rule['name'])) : ''; + $ruleDescription = isset($rule['description']) ? trim($rule['description']) : ''; + if ($ruleName === '' && $ruleDescription === '') { + continue; + } + $block = $ruleName !== '' ? ''.Tools::safeOutput($ruleName).'' : ''; + if ($ruleDescription !== '') { + $block .= ($block !== '' ? ': ' : '').$ruleDescription; + } + $policyBlocks[] = $block; + } + if (!empty($policyBlocks)) { + $cancellationPolicy = implode('

', $policyBlocks); + } + } + + if ($idHotelAddress = $objHotel->getHotelIdAddress()) { + $objHotelAddress = new Address((int)$idHotelAddress); + if (Validate::isLoadedObject($objHotelAddress)) { + $objHotelAddress->firstname = $objHotel->hotel_name; + $hotelAddress = AddressFormat::generateAddress( + $objHotelAddress, + array('avoid' => array('lastname')), + '
', + ' ' + ); + } + } + } + + // --- Rooms, services, occupancy --- + $totalRooms = 0; + $totalRoomNights = 0; + $totalGuests = 0; + $serviceGroups = array(); + $roomTypeRows = array(); + + foreach ($bookings as $booking) { + $nights = (int)HotelHelper::getNumberOfDays($booking['date_from'], $booking['date_to']); + if ($nights <= 0) { + $nights = 1; + } + + $totalGuests += (int)$booking['adults'] + (int)$booking['children']; + $totalRoomNights += $nights; + $totalRooms++; + + $dateFrom = ($booking['date_from'] && $booking['date_from'] !== '0000-00-00 00:00:00') + ? Tools::displayDate($booking['date_from'], null, false) : '--'; + $dateTo = ($booking['date_to'] && $booking['date_to'] !== '0000-00-00 00:00:00') + ? Tools::displayDate($booking['date_to'], null, false) : '--'; + + // Services for this booking + $bookingServices = array(); + + $objBookingDemand = new HotelBookingDemands(); + $extraDemands = $objBookingDemand->getRoomTypeBookingExtraDemands( + (int)$this->order->id, 0, 0, 0, 0, 0, 0, 0, + (int)$booking['id'], (int)$booking['id_order_detail'] + ); + if (is_array($extraDemands)) { + foreach ($extraDemands as $demand) { + $bookingServices[] = array('name' => $demand['name'], 'quantity' => 1); + } + } + + // Auto-added services bundled with room price (for cost calculation only) + $objServiceProductOrderDetail = new ServiceProductOrderDetail(); + $autoAddedWithRoomPriceTaxExcl = (float)$objServiceProductOrderDetail->getRoomTypeServiceProducts( + (int)$this->order->id, 0, 0, + isset($booking['id_product']) ? (int)$booking['id_product'] : 0, + isset($booking['date_from']) ? $booking['date_from'] : 0, + isset($booking['date_to']) ? $booking['date_to'] : 0, + isset($booking['id_room']) ? (int)$booking['id_room'] : 0, + 1, 0, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM + ); + + // Additional services chosen by guest + $additionalServices = $objServiceProductOrderDetail->getRoomTypeServiceProducts( + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, null, 0, (int)$booking['id'] + ); + if (isset($additionalServices[(int)$booking['id']]['additional_services'])) { + foreach ($additionalServices[(int)$booking['id']]['additional_services'] as $service) { + $bookingServices[] = array('name' => $service['name'], 'quantity' => (int)$service['quantity']); + } + } + + if (!empty($bookingServices)) { + $serviceGroups[] = array( + 'room_type_name' => isset($booking['room_type_name']) ? $booking['room_type_name'] : '', + 'check_in_date' => $dateFrom, + 'check_out_date' => $dateTo, + 'room_count' => $totalRooms, + 'services' => $bookingServices, + ); + } + + $roomTotalWithAutoServicesTaxExcl = (float)$booking['total_price_tax_excl'] + $autoAddedWithRoomPriceTaxExcl; + + // Aggregate per room type + date range + $roomTypeRowKey = implode('|', array( + (int)$booking['id_order_detail'], + isset($booking['room_type_name']) ? $booking['room_type_name'] : '', + isset($booking['date_from']) ? $booking['date_from'] : '', + isset($booking['date_to']) ? $booking['date_to'] : '', + )); + + if (!isset($roomTypeRows[$roomTypeRowKey])) { + $idOrderDetail = (int)$booking['id_order_detail']; + $detailTaxes = $idOrderDetail ? OrderDetail::getTaxListStatic($idOrderDetail) : null; + $orderDetailTaxLabel = self::l('No tax'); + if ($detailTaxes) { + $taxTemp = array(); + foreach ($detailTaxes as $tax) { + $objTax = new Tax($tax['id_tax']); + $taxTemp[] = sprintf(self::l('%1$s%2$s%%'), $objTax->rate + 0, ' '); + } + $orderDetailTaxLabel = implode(', ', $taxTemp); + } + + $roomTypeRows[$roomTypeRowKey] = array( + 'room_type_name' => isset($booking['room_type_name']) ? $booking['room_type_name'] : '', + 'order_detail_tax_label' => $orderDetailTaxLabel, + 'rooms' => 0, + 'adults' => 0, + 'children' => 0, + 'nights' => $nights, + 'check_in_date' => $dateFrom, + 'check_out_date' => $dateTo, + 'unit_price_tax_excl' => 0, + 'total_price_tax_excl' => 0, + ); + } + + $roomTypeRows[$roomTypeRowKey]['rooms'] += 1; + $roomTypeRows[$roomTypeRowKey]['adults'] += (int)$booking['adults']; + $roomTypeRows[$roomTypeRowKey]['children'] += (int)$booking['children']; + $roomTypeRows[$roomTypeRowKey]['total_price_tax_excl'] += $roomTotalWithAutoServicesTaxExcl; + } + + foreach ($roomTypeRows as &$roomTypeRow) { + $denominator = (int)$roomTypeRow['nights'] * (int)$roomTypeRow['rooms']; + if ($denominator > 0) { + $roomTypeRow['unit_price_tax_excl'] = Tools::ps_round( + $roomTypeRow['total_price_tax_excl'] / $denominator, + 6, + $this->order->round_mode + ); + } + } + unset($roomTypeRow); + + $guestAddress = ''; + $guest = new Customer((int)$this->order->id_customer); + + $addressId = (int)$this->order->id_address_invoice ?: (int)$this->order->id_address_delivery; + if ($addressId) { + $address = new Address($addressId); + if (Validate::isLoadedObject($address)) { + $guestAddress = AddressFormat::generateAddress($address, array(), '
', ' '); + } + } + + if ($idCustomerGuestDetail = OrderCustomerGuestDetail::isCustomerGuestBooking((int)$this->order->id)) { + $objGuest = new OrderCustomerGuestDetail((int)$idCustomerGuestDetail); + if (Validate::isLoadedObject($objGuest)) { + $guest = $objGuest; + } + } + // --- Totals --- + $objBookingDemand = new HotelBookingDemands(); + $totalDemandsPriceTE = (float)$objBookingDemand->getRoomTypeBookingExtraDemands( + (int)$this->order->id, 0, 0, 0, 0, 1, 1, 0 + ); + $totalDemandsPriceTI = (float)$objBookingDemand->getRoomTypeBookingExtraDemands( + (int)$this->order->id, 0, 0, 0, 0, 1, 1, 1 + ); + + $orderDetails = OrderDetail::getList((int)$this->order->id); + $idsOrderDetail = is_array($orderDetails) + ? array_unique(array_map('intval', array_column($orderDetails, 'id_order_detail'))) + : array(); + + $footer = array( + 'room_price_tax_excl' => 0, + 'service_products_price_tax_excl' => 0, + 'additional_service_price_tax_excl' => 0, + 'total_convenience_fee_te' => 0, + ); + $roomsCostTaxIncl = 0; + $serviceProductsCostTaxIncl = 0; + $additionalServicesCostTaxIncl = 0; + $convenienceFeeTaxIncl = 0; + + if (!empty($idsOrderDetail)) { + $footer['room_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, true, null, null, null, $idsOrderDetail) + $this->order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM, $idsOrderDetail); + $roomsCostTaxIncl = $this->order->getTotalProductsWithTaxes(false, true, null, null, null, $idsOrderDetail) + $this->order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM, $idsOrderDetail); + $footer['service_products_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE, false, false, $idsOrderDetail) + $this->order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE, false, false, $idsOrderDetail); + $serviceProductsCostTaxIncl = $this->order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE, false, false, $idsOrderDetail) + $this->order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE, false, false, $idsOrderDetail); + $footer['additional_service_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 0, null, $idsOrderDetail) + $totalDemandsPriceTE; + $additionalServicesCostTaxIncl = $this->order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 0, null, $idsOrderDetail) + $totalDemandsPriceTI; + $footer['total_convenience_fee_te'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT, $idsOrderDetail); + $convenienceFeeTaxIncl = $this->order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT, $idsOrderDetail); + } + + $productDiscountsTaxIncl = (float)$this->order->total_discounts_tax_incl; + foreach ($this->order->getCartRules() as $cartRule) { + if (!empty($cartRule['free_shipping'])) { + $productDiscountsTaxIncl -= (float)$this->order->total_shipping_tax_incl; + } + } + if ($productDiscountsTaxIncl < 0) { + $productDiscountsTaxIncl = 0; + } + + $footer['total_without_discount_te'] = $footer['room_price_tax_excl'] + $footer['total_convenience_fee_te'] + $footer['additional_service_price_tax_excl'] + $footer['service_products_price_tax_excl']; + $totalWithoutDiscountTaxIncl = $roomsCostTaxIncl + $serviceProductsCostTaxIncl + $additionalServicesCostTaxIncl + $convenienceFeeTaxIncl; + $footer['total_tax_without_discount'] = max(0, $totalWithoutDiscountTaxIncl - $footer['total_without_discount_te']); + $grandTotal = max(0.0, $totalWithoutDiscountTaxIncl - $productDiscountsTaxIncl); + $footer['product_discounts_tax_incl'] = $productDiscountsTaxIncl; + $footer['total_paid_tax_incl'] = $grandTotal; + $footer['amount_due'] = Tools::ps_round( + max(0, $grandTotal - (float)$this->order->getTotalPaid()), + _PS_PRICE_COMPUTE_PRECISION_, + $this->order->round_mode + ); + + $paymentMethods = array(); + $payments = $this->order->getOrderPaymentDetail(); + if (is_array($payments) && $payments) { + foreach ($payments as $paymentDetail) { + $method = isset($paymentDetail['payment_method']) ? trim($paymentDetail['payment_method']) : ''; + if (!$method) { + $method = $this->order->payment; + } + $amount = isset($paymentDetail['real_paid_amount']) + ? (float)$paymentDetail['real_paid_amount'] + : (float)$paymentDetail['amount']; + $idCurrency = isset($paymentDetail['id_currency']) + ? (int)$paymentDetail['id_currency'] + : (int)$this->order->id_currency; + $paymentMethods[] = $method.': '.Tools::displayPrice($amount, $idCurrency); + } + } + $paymentMethod = $paymentMethods ? implode('

', $paymentMethods) : $this->order->payment; + + $data = array( + 'order' => $this->order, + 'order_state' => $orderState, + 'booking_date' => Tools::displayDate($this->order->date_add, null, false), + 'issue_date' => Tools::displayDate(date('Y-m-d'), null, false), + 'hotel' => $objHotel, + 'hotel_address' => $hotelAddress, + 'guest' => $guest, + 'guest_address' => $guestAddress, + 'total_guests' => (int)$totalGuests, + 'total_rooms' => (int)$totalRooms, + 'total_room_nights' => (int)$totalRoomNights, + 'room_type_rows' => array_values($roomTypeRows), + 'service_groups' => $serviceGroups, + 'payment_method' => $paymentMethod, + 'footer' => $footer, + 'payment_policy' => $paymentPolicy, + 'cancellation_policy' => $cancellationPolicy, + ); + + if (Tools::getValue('debug')) { + die(json_encode($data)); + } + $this->smarty->assign($data); + + return $this->smarty->fetch($this->getTemplate('booking-voucher')); + } + + /** + * @return string + */ + public function getBulkFilename() + { + return self::l('BookingVouchers').'.pdf'; + } + + /** + * @return string + */ + public function getFilename() + { + return sprintf(self::l('BOOKING VOUCHER - Refrence No. #%s.pdf'), $this->order->reference); + } +} diff --git a/classes/pdf/PDF.php b/classes/pdf/PDF.php index 833d5b17e..69985fa7f 100644 --- a/classes/pdf/PDF.php +++ b/classes/pdf/PDF.php @@ -41,6 +41,7 @@ class PDFCore const TEMPLATE_ORDER_SLIP = 'OrderSlip'; const TEMPLATE_DELIVERY_SLIP = 'DeliverySlip'; const TEMPLATE_SUPPLY_ORDER_FORM = 'SupplyOrderForm'; + const TEMPLATE_BOOKING_VOUCHER = 'BookingVoucher'; const TEMPLATE_PAYMENT_RECEIPT = 'PaymentReceipt'; /** diff --git a/config/xml/themes/default.xml b/config/xml/themes/default.xml index 72ce2aae3..b8d22534f 100644 --- a/config/xml/themes/default.xml +++ b/config/xml/themes/default.xml @@ -18,8 +18,8 @@ - - + + @@ -32,8 +32,8 @@ - - + + @@ -45,7 +45,6 @@ - diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index f76331422..b72199d67 100644 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -181,69 +181,85 @@ class AdminCartsControllerCore extends AdminController public function renderKpis() { - $time = time(); - $kpis = array(); + $objCart = new Cart(Tools::getValue('id_cart')); + if (Validate::isLoadedObject($objCart)) { + $currency = new Currency($objCart->id_currency); + $summary = $objCart->getSummaryDetails(); + $tax_calculation_method = Group::getPriceDisplayMethod(Group::getCurrent()->id); + $total_price = ($tax_calculation_method == PS_TAX_EXC) + ? $summary['total_price_without_tax'] + : $summary['total_price']; - $daysForConversionRate = Configuration::get('PS_KPI_CONVERSION_RATE_NB_DAYS'); - - $helper = new HelperKpi(); - $helper->id = 'box-conversion-rate'; - $helper->icon = 'icon-sort-by-attributes-alt'; - //$helper->chart = true; - $helper->color = 'color1'; - $helper->title = $this->l('Conversion Rate', null, null, false); - if ($daysForConversionRate == 1) { - $helper->subtitle = $daysForConversionRate.' '.$this->l('day', null, null, false); + $helper = new HelperKpi(); + $helper->id = 'box-kpi-cart'; + $helper->icon = 'icon-shopping-cart'; + $helper->color = 'color1'; + $helper->title = $this->l('Total Cart', null, null, false); + $helper->subtitle = sprintf($this->l('Cart #%06d', null, null, false), $objCart->id); + $helper->value = Tools::displayPrice($total_price, $currency); + $this->kpis[] = $helper; } else { - $helper->subtitle = $daysForConversionRate.' '.$this->l('days', null, null, false); - } - if (ConfigurationKPI::get('CONVERSION_RATE_CHART') !== false) { - $helper->data = ConfigurationKPI::get('CONVERSION_RATE_CHART'); - } - $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=conversion_rate'; - $this->kpis[] = $helper; + $daysForConversionRate = Configuration::get('PS_KPI_CONVERSION_RATE_NB_DAYS'); - $helper = new HelperKpi(); - $helper->id = 'box-carts'; - $helper->icon = 'icon-shopping-cart'; - $helper->color = 'color2'; - $helper->title = $this->l('Abandoned Carts', null, null, false); - $date_from = date(Context::getContext()->language->date_format_lite, strtotime('-2 day')); - $date_to = date(Context::getContext()->language->date_format_lite, strtotime('-1 day')); - $helper->subtitle = sprintf($this->l('From %s to %s', null, null, false), $date_from, $date_to); - $helper->href = $this->context->link->getAdminLink('AdminCarts').'&action=filterOnlyAbandonedCarts&date_from='.date('Y-m-d', strtotime('-2 day')).'&date_to='.date('Y-m-d', strtotime('-1 day')); - $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=abandoned_cart'; - $this->kpis[] = $helper; + $helper = new HelperKpi(); + $helper->id = 'box-conversion-rate'; + $helper->icon = 'icon-sort-by-attributes-alt'; + //$helper->chart = true; + $helper->color = 'color1'; + $helper->title = $this->l('Conversion Rate', null, null, false); + if ($daysForConversionRate == 1) { + $helper->subtitle = $daysForConversionRate.' '.$this->l('day', null, null, false); + } else { + $helper->subtitle = $daysForConversionRate.' '.$this->l('days', null, null, false); + } + if (ConfigurationKPI::get('CONVERSION_RATE_CHART') !== false) { + $helper->data = ConfigurationKPI::get('CONVERSION_RATE_CHART'); + } + $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=conversion_rate'; + $this->kpis[] = $helper; - $daysForAvgOrderVal = Configuration::get('PS_ORDER_KPI_AVG_ORDER_VALUE_NB_DAYS'); - $helper = new HelperKpi(); - $helper->id = 'box-average-order'; - $helper->icon = 'icon-money'; - $helper->color = 'color3'; - $helper->title = $this->l('Average Order Value', null, null, false); - if ($daysForAvgOrderVal == 1) { - $helper->subtitle = $daysForAvgOrderVal.' '.$this->l('day', null, null, false); - } else { - $helper->subtitle = $daysForAvgOrderVal.' '.$this->l('days', null, null, false); + $helper = new HelperKpi(); + $helper->id = 'box-carts'; + $helper->icon = 'icon-shopping-cart'; + $helper->color = 'color2'; + $helper->title = $this->l('Abandoned Carts', null, null, false); + $date_from = date(Context::getContext()->language->date_format_lite, strtotime('-2 day')); + $date_to = date(Context::getContext()->language->date_format_lite, strtotime('-1 day')); + $helper->subtitle = sprintf($this->l('From %s to %s', null, null, false), $date_from, $date_to); + $helper->href = $this->context->link->getAdminLink('AdminCarts').'&action=filterOnlyAbandonedCarts&date_from='.date('Y-m-d', strtotime('-2 day')).'&date_to='.date('Y-m-d', strtotime('-1 day')); + $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=abandoned_cart'; + $this->kpis[] = $helper; + + $daysForAvgOrderVal = Configuration::get('PS_ORDER_KPI_AVG_ORDER_VALUE_NB_DAYS'); + $helper = new HelperKpi(); + $helper->id = 'box-average-order'; + $helper->icon = 'icon-money'; + $helper->color = 'color3'; + $helper->title = $this->l('Average Order Value', null, null, false); + if ($daysForAvgOrderVal == 1) { + $helper->subtitle = $daysForAvgOrderVal.' '.$this->l('day', null, null, false); + } else { + $helper->subtitle = $daysForAvgOrderVal.' '.$this->l('days', null, null, false); + } + + $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=average_order_value'; + $this->kpis[] = $helper; + + $daysForProfitPerVisitor = Configuration::get('PS_ORDER_KPI_PER_VISITOR_PROFIT_NB_DAYS'); + $helper = new HelperKpi(); + $helper->id = 'box-net-profit-visitor'; + $helper->icon = 'icon-user'; + $helper->color = 'color4'; + $helper->title = $this->l('Net Profit per Visitor', null, null, false); + if ($daysForProfitPerVisitor == 1) { + $helper->subtitle = $daysForProfitPerVisitor.' '.$this->l('day', null, null, false); + } else { + $helper->subtitle = $daysForProfitPerVisitor.' '.$this->l('days', null, null, false); + } + $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=netprofit_visit'; + $this->kpis[] = $helper; } - $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=average_order_value'; - $this->kpis[] = $helper; - - $daysForProfitPerVisitor = Configuration::get('PS_ORDER_KPI_PER_VISITOR_PROFIT_NB_DAYS'); - $helper = new HelperKpi(); - $helper->id = 'box-net-profit-visitor'; - $helper->icon = 'icon-user'; - $helper->color = 'color4'; - $helper->title = $this->l('Net Profit per Visitor', null, null, false); - if ($daysForProfitPerVisitor == 1) { - $helper->subtitle = $daysForProfitPerVisitor.' '.$this->l('day', null, null, false); - } else { - $helper->subtitle = $daysForProfitPerVisitor.' '.$this->l('days', null, null, false); - } - $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=netprofit_visit'; - $this->kpis[] = $helper; - return parent::renderKpis(); } @@ -254,6 +270,9 @@ class AdminCartsControllerCore extends AdminController if (!($cart = $this->loadObject(true))) { return; } + if ($this->tabAccess['kpi'] === 1) { + $this->content .= $this->renderKpis(); + } $customer = new Customer($cart->id_customer); $currency = new Currency($cart->id_currency); $this->context->cart = $cart; @@ -340,16 +359,6 @@ class AdminCartsControllerCore extends AdminController $cartHtlData = array(); } - $helper = new HelperKpi(); - $helper->id = 'box-kpi-cart'; - $helper->icon = 'icon-shopping-cart'; - $helper->color = 'color1'; - $helper->title = $this->l('Total Cart', null, null, false); - $helper->subtitle = sprintf($this->l('Cart #%06d', null, null, false), $cart->id); - $helper->value = Tools::displayPrice($total_price, $currency); - $kpi = $helper->generate(); - //end - // get standalone products in cart $objServiceProductCartDetail = new ServiceProductCartDetail(); $hotelProducts = $objServiceProductCartDetail->getServiceProductsInCart( @@ -381,7 +390,6 @@ class AdminCartsControllerCore extends AdminController 'cart_htl_data' => $cartHtlData,//by webkul hotel rooms in order data 'standalone_products' => $standaloneProducts, 'hotel_products' => $hotelProducts, - 'kpi' => $kpi, 'products' => $products, 'discounts' => $cart->getCartRules(), 'cart_orders' => $cartOrders, @@ -1121,7 +1129,7 @@ class AdminCartsControllerCore extends AdminController if ($bookingInfo['id'] == $idBookingData) { $amtWithQty = $bookingInfo['amt_with_qty']; $bookingInfo['amt_with_qty'] = Tools::displayPrice($amtWithQty); - $bookingInfo['total_price'] = Tools::displayPrice($amtWithQty + $bookingInfo['demand_price']); + $bookingInfo['total_price'] = Tools::displayPrice($amtWithQty + $bookingInfo['demand_price'] + $bookingInfo['additional_service_price'] + $bookingInfo['additional_services_auto_add_price']); $response = array( 'curr_booking_info' => $bookingInfo, 'cart_info' => $this->ajaxReturnVars(), diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 8e76b8a48..0f1305549 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -391,12 +391,15 @@ class AdminOrdersControllerCore extends AdminController ); } - $this->page_header_toolbar_btn['print'] = array( - 'short' => $this->l('Print'), - 'href' => 'javascript:window.print()', - 'desc' => $this->l('Print order'), - 'class' => 'icon-print', - ); + if (HotelBookingDetail::getIdHotelByIdOrder($order->id, false) && !$this->lite_display) { + $this->page_header_toolbar_btn['booking_voucher'] = array( + 'short' => $this->l('Booking Voucher'), + 'href' => $this->context->link->getAdminLink('AdminPdf').'&submitAction=generateBookingVoucherPDF&id_order='.$order->id, + 'desc' => $this->l('View booking voucher'), + 'class' => 'icon-file-text', + 'target' => true, + ); + } if ($this->tabAccess['edit'] === 1) { if (((int) $order->isReturnable()) @@ -1346,6 +1349,8 @@ class AdminOrdersControllerCore extends AdminController parent::setMedia(); $this->addJqueryUI('ui.datepicker'); + $this->addJqueryUI('ui.tooltip', 'base', true); + $this->addJS(_PS_JS_DIR_.'vendor/d3.v3.min.js'); if ($this->display == 'view') { @@ -3215,6 +3220,7 @@ class AdminOrdersControllerCore extends AdminController if (!Validate::isLoadedObject($order = new Order(Tools::getValue('id_order')))) { return; } + if ($this->tabAccess['kpi'] === 1) { $this->content .= $this->renderKpis(); } @@ -3577,6 +3583,8 @@ class AdminOrdersControllerCore extends AdminController $order_detail_data[$key]['amt_with_qty_tax_incl'] = $value['total_price_tax_incl']; $order_detail_data[$key]['room_type_info'] = $objHotelRoomType->getRoomTypeInfoByIdProduct($value['id_product']); $order_detail_data[$key]['total_room_tax'] = $order_detail_data[$key]['total_room_price_ti'] - $order_detail_data[$key]['total_room_price_te']; + $order_detail_data[$key]['num_checkin_documents'] = HotelBookingDocument::getCountByIdHtlBooking($value['id']); + $order_detail_data[$key]['connected_rooms'] = HotelConnectedRoom::getConnectedRooms($value['id_room'], null, null, (int) Context::getContext()->language->id); if (isset($value['refund_info']) && $value['refund_info']['refunded'] diff --git a/controllers/admin/AdminPdfController.php b/controllers/admin/AdminPdfController.php index 2e534d75b..2b74dad25 100644 --- a/controllers/admin/AdminPdfController.php +++ b/controllers/admin/AdminPdfController.php @@ -64,6 +64,15 @@ class AdminPdfControllerCore extends AdminController } } + public function processGenerateBookingVoucherPDF() + { + if (Tools::isSubmit('id_order')) { + $this->generateBookingVoucherPDFByIdOrder(Tools::getValue('id_order')); + } else { + die(Tools::displayError('The order ID is missing.')); + } + } + public function processGenerateOrderSlipPDF() { $order_slip = new OrderSlip((int)Tools::getValue('id_order_slip')); @@ -225,6 +234,23 @@ class AdminPdfControllerCore extends AdminController $this->generatePDF($order_invoice, PDF::TEMPLATE_INVOICE); } + public function generateBookingVoucherPDFByIdOrder($id_order) + { + $order = new Order((int)$id_order); + if (!Validate::isLoadedObject($order)) { + die(Tools::displayError('The order cannot be found within your database.')); + } + + $objHotelBookingDetail = new HotelBookingDetail(); + $bookingDetails = $objHotelBookingDetail->getBookingDataByOrderId((int)$order->id); + if (empty($bookingDetails)) { + die(Tools::displayError('No booking voucher is available for this order.')); + } + + $pdf = new PDF($order, PDF::TEMPLATE_BOOKING_VOUCHER, Context::getContext()->smarty); + $pdf->render('I'); + } + public function generatePDF($object, $template) { $pdf = new PDF($object, $template, Context::getContext()->smarty); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index fe5fe48d5..13d003d67 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -1609,7 +1609,8 @@ class AdminProductsControllerCore extends AdminController ) { $this->addJqueryUI(array( 'ui.core', - 'ui.widget' + 'ui.widget', + 'ui.tooltip' )); $this->addjQueryPlugin(array( @@ -3188,6 +3189,7 @@ class AdminProductsControllerCore extends AdminController $disableDates = $objRoomDisableDates->getRoomDisableDates($room['id']); $room['disable_dates_json'] = json_encode($disableDates); } + $room['connected_rooms_count'] = HotelConnectedRoom::getTotalConnectedRooms($room['id']); } $data->assign('htl_room_info', $hotelRoomInfo); @@ -3815,6 +3817,7 @@ class AdminProductsControllerCore extends AdminController $this->errors[] = $this->l('This room cannot be deleted as this room contains future booking.'); } if (empty($this->errors)) { + $response['affected_rooms'] = HotelConnectedRoom::getTotalConnectedRooms(null, $idRoom); if ($objRoomInfo->delete()) { $response['success'] = true; } else { @@ -5550,7 +5553,9 @@ class AdminProductsControllerCore extends AdminController if (empty($this->errors)) { foreach ($roomsInfo as $roomInfo) { $objHotelRoomInfo = new HotelRoomInformation($roomInfo['id']); - $objHotelRoomInfo->id_status = $roomInfo['id_status']; + if (!empty($roomInfo['id_status'])) { + $objHotelRoomInfo->id_status = $roomInfo['id_status']; + } if (isset($roomInfo['floor']) && $roomInfo['floor'] != '') { $objHotelRoomInfo->floor = $roomInfo['floor']; } @@ -5751,4 +5756,102 @@ class AdminProductsControllerCore extends AdminController return $tpl->fetch(); } + + public function ajaxProcessGetNotConnectedRooms() + { + $roomId = (int) Tools::getValue('room_id'); + $roomTypeId = (int) Tools::getValue('room_type_id'); + $allGroups = HotelConnectedRoom::getNotConnectedRooms($roomId, $this->context->language->id); + $rooms = isset($allGroups[$roomTypeId]) ? $allGroups[$roomTypeId]['rooms'] : array(); + die(Tools::jsonEncode(['success' => true, 'rooms' => $rooms])); + } + + public function ajaxProcessInitConnectedRoomModal() + { + $response['hasError'] = 1; + $roomId = (int) Tools::getValue('room_id'); + $objRoom = new HotelRoomInformation($roomId); + $idProduct = (int) $objRoom->id_product; + $idHotel = (int) $objRoom->id_hotel; + + $this->context->smarty->assign(array( + 'htl_connected_rooms' => HotelConnectedRoom::getConnectedRooms($roomId, null, null, $this->context->language->id), + 'htl_not_connected_rooms' => HotelConnectedRoom::getNotConnectedRooms($roomId, $this->context->language->id), + 'main_room_id' => $roomId, + 'current_roomtype' => $idProduct, + )); + + $modal = array( + 'modal_id' => 'connectedRoomModal', + 'modal_class' => 'modal-md', + 'modal_title' => '  '.$this->l('Connected Room').' ', + 'modal_content' => $this->context->smarty->fetch('controllers/products/modal-connected-rooms.tpl'), + 'modal_actions' => array(), + ); + + $this->context->smarty->assign($modal); + $response['hasError'] = 0; + $response['modalHtml'] = $this->context->smarty->fetch('modal.tpl'); + + die(Tools::jsonEncode($response)); + } + + public function ajaxProcessManageConnectedRoom() + { + if ($this->tabAccess['edit'] !== 1) { + die(json_encode(['success' => false, 'message' => $this->l('You do not have permission to edit this.')])); + } + + $mode = Tools::getValue('mode'); + $roomId = (int) Tools::getValue('room_id'); + $connectedRoomId = (int) Tools::getValue('connected_room_id'); + $connectedId = (int) Tools::getValue('connected_id'); + $objRoom = new HotelRoomInformation($roomId); + $idProduct = (int) $objRoom->id_product; + $idHotel = (int) $objRoom->id_hotel; + + if ($mode === 'add') { + $connection = new HotelConnectedRoom(); + $connection->id_room = $roomId; + $connection->id_room_connected = $connectedRoomId; + if ($connection->add()) { + $this->context->smarty->assign(array( + 'htl_connected_rooms' => HotelConnectedRoom::getConnectedRooms($roomId, null, null, $this->context->language->id), + 'htl_not_connected_rooms' => HotelConnectedRoom::getNotConnectedRooms($roomId, $this->context->language->id), + 'main_room_id' => $roomId, + 'current_roomtype' => $idProduct, + )); + die(json_encode([ + 'html' => $this->context->smarty->fetch('controllers/products/modal-connected-rooms.tpl'), + 'success' => true, + 'message' => $this->l('Room connected successfully.'), + 'connected_count' => HotelConnectedRoom::getTotalConnectedRooms($roomId), + ])); + } + die(json_encode(['success' => false, 'message' => $this->l('Failed to connect room.')])); + } + + if ($mode === 'delete') { + if (!$connectedId) { + die(json_encode(['success' => false, 'message' => $this->l('Invalid data.')])); + } + $objHotelConnectedRoom = new HotelConnectedRoom($connectedId); + if ($objHotelConnectedRoom->delete()) { + $this->context->smarty->assign(array( + 'htl_connected_rooms' => HotelConnectedRoom::getConnectedRooms($roomId, null, null, $this->context->language->id), + 'htl_not_connected_rooms' => HotelConnectedRoom::getNotConnectedRooms($roomId, $this->context->language->id), + 'main_room_id' => $roomId, + 'current_roomtype' => $idProduct, + )); + die(json_encode([ + 'success' => true, + 'html' => $this->context->smarty->fetch('controllers/products/modal-connected-rooms.tpl'), + 'message' => $this->l('Connected room removed successfully.'), + 'connected_count' => HotelConnectedRoom::getTotalConnectedRooms($roomId), + ])); + } + die(json_encode(['success' => false, 'message' => $this->l('Failed to remove connected room.')])); + } + } + } diff --git a/controllers/front/OrderConfirmationController.php b/controllers/front/OrderConfirmationController.php index f83b1fd7e..f00addd43 100644 --- a/controllers/front/OrderConfirmationController.php +++ b/controllers/front/OrderConfirmationController.php @@ -201,8 +201,8 @@ class OrderConfirmationControllerCore extends FrontController //// By webkul New way to calculate product prices with feature Prices $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_excl'] = $data_v['total_price_tax_excl']/$num_days; $cart_htl_data[$type_key]['date_diff'][$date_join]['paid_unit_price_tax_incl'] = $data_v['total_price_tax_incl']/$num_days; - $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] = $data_v['total_price_tax_incl']*$var_quant; - $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] = $data_v['total_price_tax_excl']*$var_quant; + $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_incl'] += $data_v['total_price_tax_incl']; + $cart_htl_data[$type_key]['date_diff'][$date_join]['amount_tax_excl'] += $data_v['total_price_tax_excl']; $cart_htl_data[$type_key]['date_diff'][$date_join]['is_backorder'] = $data_v['is_back_order']; if ($data_v['is_back_order']) { $any_back_order = 1; diff --git a/controllers/front/PdfBookingVoucherController.php b/controllers/front/PdfBookingVoucherController.php new file mode 100644 index 000000000..0ba3302c9 --- /dev/null +++ b/controllers/front/PdfBookingVoucherController.php @@ -0,0 +1,70 @@ +context->customer->isLogged() && !Tools::getValue('secure_key')) { + Tools::redirect('index.php?controller=authentication&back=pdf-booking-voucher'); + } + + $idOrder = (int)Tools::getValue('id_order'); + if (!Validate::isUnsignedId($idOrder)) { + die(Tools::displayError('The booking voucher was not found.')); + } + + $order = new Order($idOrder); + if (!Validate::isLoadedObject($order)) { + die(Tools::displayError('The booking voucher was not found.')); + } + + $secureKey = Tools::getValue('secure_key'); + if ($secureKey) { + if ($order->secure_key !== $secureKey) { + die(Tools::displayError('The booking voucher was not found.')); + } + } elseif ($order->id_customer != (int)$this->context->customer->id) { + die(Tools::displayError('The booking voucher was not found.')); + } + + $this->order = $order; + } + + public function display() + { + $pdf = new PDF($this->order, PDF::TEMPLATE_BOOKING_VOUCHER, $this->context->smarty); + $pdf->render(); + } +} diff --git a/install/classes/datas.php b/install/classes/datas.php index f002ca12d..a5b3cf59c 100644 --- a/install/classes/datas.php +++ b/install/classes/datas.php @@ -150,7 +150,12 @@ class Datas 'name' => 'newsletter', 'default' => 1, 'help' => 'Get news from QloApps', - ) + ), + 'enable_ssl' => array( + 'name' => 'ssl', + 'default' => 0, + 'help' => 'Enable SSL for QloApps', + ), ); protected $datas = array(); diff --git a/install/controllers/console/process.php b/install/controllers/console/process.php index def56c22b..ffa033860 100644 --- a/install/controllers/console/process.php +++ b/install/controllers/console/process.php @@ -238,6 +238,7 @@ class InstallControllerConsoleProcess extends InstallControllerConsole 'admin_lastname' => $this->datas->admin_lastname, 'admin_password' => $this->datas->admin_password, 'admin_email' => $this->datas->admin_email, + 'enable_ssl' => $this->datas->enable_ssl, 'marketing_consent' => $this->datas->marketing_consent, 'configuration_agrement' => true, 'send_informations' => true, diff --git a/install/data/xml/meta.xml b/install/data/xml/meta.xml index 4c9a0b225..581bd5ca3 100644 --- a/install/data/xml/meta.xml +++ b/install/data/xml/meta.xml @@ -32,14 +32,18 @@ password 1 + + supplier 1 @@ -92,14 +96,18 @@ order 1 + + order-opc 1 @@ -144,10 +152,12 @@ module-cashondelivery-validation 0 + our-properties 1 diff --git a/install/data/xml/theme_meta.xml b/install/data/xml/theme_meta.xml index ce42c1a27..0a23d98fd 100644 --- a/install/data/xml/theme_meta.xml +++ b/install/data/xml/theme_meta.xml @@ -39,9 +39,5 @@ - - - - diff --git a/install/langs/bg/data/meta.xml b/install/langs/bg/data/meta.xml index 2cb836a57..477b6da88 100644 --- a/install/langs/bg/data/meta.xml +++ b/install/langs/bg/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/bn/data/meta.xml b/install/langs/bn/data/meta.xml index 57422b652..712181078 100644 --- a/install/langs/bn/data/meta.xml +++ b/install/langs/bn/data/meta.xml @@ -19,8 +19,8 @@ contact-us - হোটেল প্রাইম - এটি এমন একটি স্থান যেখানে আরাম এবং বিলাসিতা প্রকৃতির সাথে মিলিত হয়েছে! + + @@ -42,18 +42,22 @@ password-recovery + + সরবরাহকারী সরবরাহকারির তালিকা @@ -138,18 +142,22 @@ order + + অর্ডার @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/br/data/meta.xml b/install/langs/br/data/meta.xml index 064e8ab57..ce3e8cbb4 100644 --- a/install/langs/br/data/meta.xml +++ b/install/langs/br/data/meta.xml @@ -19,8 +19,8 @@ entrar-em-contato-conosco - Hotel Prime - Um lugar onde o conforto e o luxo se misturam com a natureza! + + @@ -42,18 +42,22 @@ forgot, password, e-mail, new, reset recuperar-senha + + Fornecedores Lista de fornecedores @@ -138,18 +142,22 @@ pedido + + Pedido @@ -168,10 +176,12 @@ confirmação-do-pedido + diff --git a/install/langs/cs/data/meta.xml b/install/langs/cs/data/meta.xml index c566a1a06..d15d88d00 100644 --- a/install/langs/cs/data/meta.xml +++ b/install/langs/cs/data/meta.xml @@ -19,8 +19,8 @@ napiste-nam - Hotel Prime - Místo, kde se komfort a luxus mísí s přírodou! + + @@ -42,18 +42,22 @@ password-recovery + + Dodavatelé Suppliers list @@ -138,18 +142,22 @@ objednavka + + Rychlá Objednávka @@ -168,10 +176,12 @@ potvrzeni-objednavky + diff --git a/install/langs/de/data/meta.xml b/install/langs/de/data/meta.xml index f79a747c2..b490fa981 100644 --- a/install/langs/de/data/meta.xml +++ b/install/langs/de/data/meta.xml @@ -19,8 +19,8 @@ kontaktieren-sie-uns - Hotel Prime - Ein Ort, an dem Komfort und Luxus mit der Natur verschmelzen! + + @@ -42,18 +42,22 @@ vergessen, Kennwort, E-Mail, neu, Reset kennwort-wiederherstellung + + Zulieferer Zuliefererliste @@ -138,18 +142,22 @@ bestellung + + Bestellung @@ -168,10 +176,12 @@ bestellbestatigung + diff --git a/install/langs/en/data/meta.xml b/install/langs/en/data/meta.xml index 531c61efb..5f4fa253b 100644 --- a/install/langs/en/data/meta.xml +++ b/install/langs/en/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/es/data/meta.xml b/install/langs/es/data/meta.xml index ba7665bca..2f7f8eb60 100644 --- a/install/langs/es/data/meta.xml +++ b/install/langs/es/data/meta.xml @@ -19,8 +19,8 @@ contactanos - Hotel Prime - ¡Un lugar donde el confort y el lujo se mezclan con la naturaleza! + + @@ -42,18 +42,22 @@ contraseña, has olvidado, e-mail, nuevo, regeneración recuperacion-contraseña + + Proveedores Lista de proveedores @@ -138,18 +142,22 @@ pedido + + Pedido @@ -168,10 +176,12 @@ confirmacion-pedido + diff --git a/install/langs/fa/data/meta.xml b/install/langs/fa/data/meta.xml index 6cccce71b..efe792c08 100644 --- a/install/langs/fa/data/meta.xml +++ b/install/langs/fa/data/meta.xml @@ -19,8 +19,8 @@ contact-us - هتل پرایم - مکانی که در آن راحتی و لوکس بودن با طبیعت ترکیب شده‌اند! + + @@ -42,18 +42,22 @@ password-recovery + + تامین کننده ها لیست تامین کننده ها @@ -138,18 +142,22 @@ order + + سفارش @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/fr/data/meta.xml b/install/langs/fr/data/meta.xml index 5939be426..a3f4b6356 100644 --- a/install/langs/fr/data/meta.xml +++ b/install/langs/fr/data/meta.xml @@ -19,8 +19,8 @@ nous-contacter - Hôtel Prime - Un endroit où le confort et le luxe se mélangent avec la nature ! + + @@ -42,18 +42,22 @@ recuperation-mot-de-passe + + Fournisseurs Liste des fournisseurs @@ -138,18 +142,22 @@ commande + + Commande @@ -168,10 +176,12 @@ confirmation-commande + diff --git a/install/langs/he/data/meta.xml b/install/langs/he/data/meta.xml index 758bcf4fb..6e4e74b0c 100644 --- a/install/langs/he/data/meta.xml +++ b/install/langs/he/data/meta.xml @@ -19,8 +19,8 @@ צור-קשר - מלון פריים - מקום שבו נוחות ולוקסוס משתלבים עם הטבע! + + @@ -42,18 +42,22 @@ שחזור-סיסמה + + ספקים רשימת ספקים @@ -138,18 +142,22 @@ הזמנה + + הזמנה @@ -168,10 +176,12 @@ אימות-הזמנה + diff --git a/install/langs/hr/data/meta.xml b/install/langs/hr/data/meta.xml index 7057dfacb..c1b1b4d50 100644 --- a/install/langs/hr/data/meta.xml +++ b/install/langs/hr/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/hu/data/meta.xml b/install/langs/hu/data/meta.xml index 8d36562c3..2eaba831e 100644 --- a/install/langs/hu/data/meta.xml +++ b/install/langs/hu/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/id/data/meta.xml b/install/langs/id/data/meta.xml index 77819f8cd..a2d237d81 100644 --- a/install/langs/id/data/meta.xml +++ b/install/langs/id/data/meta.xml @@ -19,8 +19,8 @@ hubungi-kami - Hotel Prime - Tempat di mana kenyamanan dan kemewahan berpadu dengan alam! + + @@ -42,18 +42,22 @@ forgot, password, e-mail, new, reset lupa-password + + Supplier Daftar supplier @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ konfirmasi-pembelian + diff --git a/install/langs/it/data/meta.xml b/install/langs/it/data/meta.xml index 22485f8c0..d76e76389 100644 --- a/install/langs/it/data/meta.xml +++ b/install/langs/it/data/meta.xml @@ -19,8 +19,8 @@ contattarci - Hotel Prime -Un luogo dove il comfort e il lusso si mescolano con la natura! + + @@ -42,18 +42,22 @@ dimenticato, password, e-mail, nuovo, reset recupero-password + + Fornitori Elenco fornitori @@ -138,18 +142,22 @@ ordine + + Ordine @@ -168,10 +176,12 @@ conferma-ordine + diff --git a/install/langs/lt/data/meta.xml b/install/langs/lt/data/meta.xml index 3a18628ef..9edaf7602 100644 --- a/install/langs/lt/data/meta.xml +++ b/install/langs/lt/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - Vieta, kur komfortas ir prabanga dera su gamta! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/mk/data/meta.xml b/install/langs/mk/data/meta.xml index 541576642..56f0d3810 100644 --- a/install/langs/mk/data/meta.xml +++ b/install/langs/mk/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/nl/data/meta.xml b/install/langs/nl/data/meta.xml index 3a6cfe94d..d2ad17c19 100644 --- a/install/langs/nl/data/meta.xml +++ b/install/langs/nl/data/meta.xml @@ -19,8 +19,8 @@ contact-met-ons-opnemen - Hotel Prime - Een plek waar comfort en luxe samengaan met de natuur! + + @@ -42,18 +42,22 @@ forgot, password, e-mail, new, reset wachtwoord-opvragen + + Leveranciers Lijst met leveranciers @@ -132,18 +136,22 @@ bestelling + + Bestelling @@ -162,10 +170,12 @@ order-bevestiging + diff --git a/install/langs/no/data/meta.xml b/install/langs/no/data/meta.xml index 9fb17959f..442acfa9e 100644 --- a/install/langs/no/data/meta.xml +++ b/install/langs/no/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/pl/data/meta.xml b/install/langs/pl/data/meta.xml index 0934c53e1..61c8f1c8c 100644 --- a/install/langs/pl/data/meta.xml +++ b/install/langs/pl/data/meta.xml @@ -19,8 +19,8 @@ kontakt - Hotel Prime - Miejsce, gdzie komfort i luksus łączą się z naturą! + + @@ -42,18 +42,22 @@ przypomnienie, hasło, e-mail, nowy odzyskiwanie-hasla + + Dostawcy Lista dostawców @@ -138,18 +142,22 @@ zamowienie + + Zamówienie @@ -168,10 +176,12 @@ potwierdzenie-zamowienia + diff --git a/install/langs/pt/data/meta.xml b/install/langs/pt/data/meta.xml index 25504b1e0..f46abbe2d 100644 --- a/install/langs/pt/data/meta.xml +++ b/install/langs/pt/data/meta.xml @@ -19,8 +19,8 @@ contacte-nos - Hotel Prime - Um lugar onde o conforto e o luxo se misturam com a natureza! + + @@ -42,18 +42,22 @@ esqueci-me, recuperar, palavra-passe, e-mail, nova, reset recuperar-palavra-passe + + Fornecedores Lista de Fornecedores @@ -138,18 +142,22 @@ encomenda + + Encomenda Rápida @@ -168,10 +176,12 @@ confirmacao-encomenda + diff --git a/install/langs/qc/data/meta.xml b/install/langs/qc/data/meta.xml index 551c9e9e9..d83c56aa5 100644 --- a/install/langs/qc/data/meta.xml +++ b/install/langs/qc/data/meta.xml @@ -19,8 +19,8 @@ nous-contacter - Hôtel Prime - Un endroit où le confort et le luxe se mêlent à la nature ! + + @@ -42,18 +42,22 @@ recuperation-mot-de-passe + + Fournisseurs Liste des fournisseurs @@ -132,18 +136,22 @@ commande + + Commande @@ -162,10 +170,12 @@ confirmation-commande + diff --git a/install/langs/ro/data/meta.xml b/install/langs/ro/data/meta.xml index 1183e23ba..6b93eee1e 100644 --- a/install/langs/ro/data/meta.xml +++ b/install/langs/ro/data/meta.xml @@ -19,8 +19,8 @@ contact - Hotel Prime - Un loc unde confortul și luxul se îmbină cu natura! + + @@ -42,18 +42,22 @@ recuperare-parola + + Furnizori Lista furnizorilor @@ -138,18 +142,22 @@ comanda + + Comandă @@ -168,10 +176,12 @@ confirmare-comanda + diff --git a/install/langs/ru/data/meta.xml b/install/langs/ru/data/meta.xml index f32b4d38c..908c81c4b 100644 --- a/install/langs/ru/data/meta.xml +++ b/install/langs/ru/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Отель Прайм - Место, где комфорт и роскошь сочетаются с природой! + + @@ -42,18 +42,22 @@ забыли пароль, e-mail, новый пароль,восстановить пароль password-recovery + + Поставщики Список поставщиков @@ -138,18 +142,22 @@ order + + Быстрый заказ @@ -162,10 +170,12 @@ guest-tracking + diff --git a/install/langs/si/data/meta.xml b/install/langs/si/data/meta.xml index 33e1e78b2..a6b3d6a23 100644 --- a/install/langs/si/data/meta.xml +++ b/install/langs/si/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/sr/data/meta.xml b/install/langs/sr/data/meta.xml index 1c68f04c5..7aff1d638 100644 --- a/install/langs/sr/data/meta.xml +++ b/install/langs/sr/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/sv/data/meta.xml b/install/langs/sv/data/meta.xml index 0c8036887..ef818fd95 100644 --- a/install/langs/sv/data/meta.xml +++ b/install/langs/sv/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/tw/data/meta.xml b/install/langs/tw/data/meta.xml index c1a2ca7ed..a73b12ef7 100644 --- a/install/langs/tw/data/meta.xml +++ b/install/langs/tw/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Prime 酒店 - 一個舒適與奢華與自然融合的地方! + + @@ -42,18 +42,22 @@ forgot, password, e-mail, new, reset password-recovery + + 供應商 供應商列表 @@ -138,18 +142,22 @@ order + + 訂單 @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/vn/data/meta.xml b/install/langs/vn/data/meta.xml index 69a0bba3d..1a84b1dc9 100644 --- a/install/langs/vn/data/meta.xml +++ b/install/langs/vn/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Khách sạn Prime - Nơi mà sự thoải mái và sang trọng hòa quyện với thiên nhiên! + + @@ -42,18 +42,22 @@ password-recovery + + Nhà cung cấp Suppliers list @@ -138,18 +142,22 @@ order + + Đơn hàng @@ -168,10 +176,12 @@ order-confirmation + diff --git a/install/langs/zh/data/meta.xml b/install/langs/zh/data/meta.xml index 9fb5a12ce..2c6fe190c 100644 --- a/install/langs/zh/data/meta.xml +++ b/install/langs/zh/data/meta.xml @@ -19,8 +19,8 @@ contact-us - Hotel Prime - A place where comfort and luxury are blended with nature! + + @@ -42,18 +42,22 @@ password-recovery + + Suppliers Suppliers list @@ -138,18 +142,22 @@ order + + Order @@ -168,10 +176,12 @@ order-confirmation + diff --git a/mails/en/account.html b/mails/en/account.html index c80631219..d5e047532 100644 --- a/mails/en/account.html +++ b/mails/en/account.html @@ -68,10 +68,10 @@ - + Hi {firstname} {lastname},
Thank you for creating a customer account at {shop_name}. -
+ @@ -83,14 +83,14 @@   - +

Your {shop_name} login details

Here are your login details:
E-mail address: {email}
-
+   @@ -106,7 +106,7 @@   - +

Important Security Tips:

  1. Always keep your account details safe.
  2. @@ -114,7 +114,7 @@
  3. Change your password regularly.
  4. Should you suspect someone is using your account illegally, please notify us immediately.
-
+   @@ -126,9 +126,9 @@ - + You can now place orders on our website: {shop_name} - + diff --git a/mails/en/awaiting_payment.html b/mails/en/awaiting_payment.html index c6bc613c6..d83fbe902 100644 --- a/mails/en/awaiting_payment.html +++ b/mails/en/awaiting_payment.html @@ -69,10 +69,10 @@ - + Hi {firstname} {lastname},
{order_header_line_html} -
+ @@ -84,13 +84,13 @@   - +

Order {order_name} - Awaiting payment

Order reference: {order_name}
Payment method: {payment_method}
-
+   @@ -103,18 +103,18 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/backoffice_order.html b/mails/en/backoffice_order.html index 0b40f8b35..f779ea6ef 100644 --- a/mails/en/backoffice_order.html +++ b/mails/en/backoffice_order.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,12 +83,12 @@   - +

A new order has been generated on your behalf.

Please go on {order_link} to finalize the payment. -
+   diff --git a/mails/en/booking_extra_demands.tpl b/mails/en/booking_extra_demands.tpl index b43ac4bed..fe38cdadd 100644 --- a/mails/en/booking_extra_demands.tpl +++ b/mails/en/booking_extra_demands.tpl @@ -23,22 +23,22 @@ {if $smarty.foreach.demandRow.first} - + {$data_v['name']}
{$rm_v['data_form']|date_format:"%d-%m-%Y"} {l s='to'} {$rm_v['data_to']|date_format:"%d-%m-%Y"}
{l s='Room'} - {$roomCount} -
+ {/if} - + {$demand['name']} - + - + {convertPrice price=$demand['total_price_tax_excl']} - + {/foreach} @@ -81,31 +81,31 @@ {if $smarty.foreach.serviceRow.first} - + {$data_v['name']}
{$rm_v['data_form']|date_format:"%d-%m-%Y"} {l s='to'} {$rm_v['data_to']|date_format:"%d-%m-%Y"}
{l s='Room'} - {$roomCount} -
+ {/if} - + {$service['name']} - + - + {if $service['allow_multiple_quantity']} {$service['quantity']} {else} {l s='--'} {/if} - + - + {convertPrice price=$service['total_price_tax_excl']} - + {/foreach} diff --git a/mails/en/booking_extra_demands.txt b/mails/en/booking_extra_demands.txt index 3139f8ce3..21f96098b 100644 --- a/mails/en/booking_extra_demands.txt +++ b/mails/en/booking_extra_demands.txt @@ -13,22 +13,22 @@ {foreach name=demandRow from=$roomDemand['extra_demands'] item=demand} {if $smarty.foreach.demandRow.first} - + {$data_v['name']}
{$rm_v['data_form']|date_format:"%d-%m-%Y"} {l s='to'} {$rm_v['data_to']|date_format:"%d-%m-%Y"}
{l s='Room'} - {$roomCount} -
+ {/if} - + {$demand['name']} - + - + {convertPrice price=$demand['total_price_tax_excl']} - + {/foreach} diff --git a/mails/en/contact.html b/mails/en/contact.html index 5c5aa9d53..210b11f5d 100644 --- a/mails/en/contact.html +++ b/mails/en/contact.html @@ -68,9 +68,9 @@ - + Message from a {shop_name} customer - + @@ -82,11 +82,11 @@   - + {contact_content_html} - +   diff --git a/mails/en/contact_form.html b/mails/en/contact_form.html index 73a8a7143..2a6cc0301 100644 --- a/mails/en/contact_form.html +++ b/mails/en/contact_form.html @@ -69,9 +69,9 @@ - + Your message to {shop_name} Customer Service - + @@ -83,7 +83,7 @@   - + Your message has been sent successfully.

Message: {message}

@@ -91,7 +91,7 @@ Product: {product_name}
Attached file: {attached_file}
-
+   @@ -103,10 +103,10 @@ - + We will answer as soon as possible. - + diff --git a/mails/en/credit_slip.html b/mails/en/credit_slip.html index 6aee0c304..40928b0e2 100644 --- a/mails/en/credit_slip.html +++ b/mails/en/credit_slip.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,12 +83,12 @@   - +

Order {order_name} - Credit slip created

We have generated a credit slip in your name for order with the reference {order_name}. -
+   @@ -100,10 +100,10 @@ - + You can review this credit slip and download your invoice from the "My credit slips" section of your account by clicking "My account" on our website. - + diff --git a/mails/en/credit_slip_voucher.html b/mails/en/credit_slip_voucher.html index e864fd62b..6f5ba20a6 100644 --- a/mails/en/credit_slip_voucher.html +++ b/mails/en/credit_slip_voucher.html @@ -71,9 +71,9 @@ - + Hi {firstname} {lastname},
-
+ @@ -85,7 +85,7 @@   - +

VOUCHER GENERATED

@@ -95,7 +95,7 @@ Voucher Code: {voucher_code} for an amount of {voucher_amount}.

To use this voucher just copy and paste this code during payment process for your next order.
-
+   diff --git a/mails/en/download_product.html b/mails/en/download_product.html index a9d6b6e9a..a42775e85 100644 --- a/mails/en/download_product.html +++ b/mails/en/download_product.html @@ -69,10 +69,10 @@ - + Hi {firstname} {lastname},
Thank you for your order with the reference {order_name} from {shop_name} -
+ @@ -84,14 +84,14 @@   - +

Product(s) now available for download

You have {nbProducts} product(s) now available for download using the following link(s):

{virtualProducts}
-
+   @@ -103,18 +103,18 @@ - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/employee_password.html b/mails/en/employee_password.html index 7b1b059c9..d17759824 100644 --- a/mails/en/employee_password.html +++ b/mails/en/employee_password.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,7 +83,7 @@   - +

Your {shop_name} login information

@@ -93,7 +93,7 @@ Password: {passwd}
E-mail address: {email}
-
+   diff --git a/mails/en/forward_msg.html b/mails/en/forward_msg.html index 07728db09..f9d56a845 100644 --- a/mails/en/forward_msg.html +++ b/mails/en/forward_msg.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,7 +83,7 @@   - +

Customer service - Forwarded discussion

@@ -91,7 +91,7 @@ Discussion history: {messages}

{employee} added "{comment}"
-
+   diff --git a/mails/en/guest_to_customer.html b/mails/en/guest_to_customer.html index 0dc1e5c9a..fbed53b8a 100644 --- a/mails/en/guest_to_customer.html +++ b/mails/en/guest_to_customer.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,7 +83,7 @@   - +

Your customer account creation

@@ -91,7 +91,7 @@ E-mail address: {email}

Password: {passwd}
-
+   @@ -103,19 +103,19 @@ - + Please be careful when sharing these login details with others. - + - + You can access your customer account on our website: {shop_url} - + diff --git a/mails/en/in_transit.html b/mails/en/in_transit.html index 6c5318515..56b82dd3e 100644 --- a/mails/en/in_transit.html +++ b/mails/en/in_transit.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,14 +83,14 @@   - +

Order {order_name} - In transit

Your order with the reference {order_name} is currently in transit.

You can track your package using the following link: {followup}
-
+   @@ -102,18 +102,18 @@ - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/log_alert.html b/mails/en/log_alert.html index 13766029f..66299ede6 100644 --- a/mails/en/log_alert.html +++ b/mails/en/log_alert.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,13 +83,13 @@   - +

You have received a new log alert

Warning: you have received a new log alert in your Back Office.

You can check for it in the "Tools" > "Logs" section of your Back Office.
-
+   diff --git a/mails/en/order_canceled.html b/mails/en/order_canceled.html index 5271ab209..52f2eb3f4 100644 --- a/mails/en/order_canceled.html +++ b/mails/en/order_canceled.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,12 +83,12 @@   - +

Order canceled - {order_name}

Your order with the reference {order_name} has been canceled. -
+   @@ -104,7 +104,7 @@   - +

Here are your order details:

@@ -112,7 +112,7 @@ Order reference: {order_name}
Order total: {total_paid}

-
+
{order_hotel_detail_html} @@ -127,18 +127,18 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/order_changed.html b/mails/en/order_changed.html index c224bc3ff..4e700defb 100644 --- a/mails/en/order_changed.html +++ b/mails/en/order_changed.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,12 +83,12 @@   - +

Order {order_name} - Order changed

Your order with the reference {order_name} from {hotel_hotel_name} has been changed by the merchant. -
+   @@ -100,18 +100,18 @@ - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/order_conf.html b/mails/en/order_conf.html index 5e58397d2..dc29689fd 100755 --- a/mails/en/order_conf.html +++ b/mails/en/order_conf.html @@ -71,10 +71,10 @@ - + Hi {firstname} {lastname},
{order_header_line_html} -
+ @@ -86,14 +86,14 @@   - +

Order details

Order: {order_name} Placed on {date}

Payment: {payment}
-
+   @@ -123,18 +123,18 @@ - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/order_conf_admin.html b/mails/en/order_conf_admin.html index 28729c428..a5117aa9e 100755 --- a/mails/en/order_conf_admin.html +++ b/mails/en/order_conf_admin.html @@ -70,10 +70,10 @@ - + Hi {firstname} {lastname},
{order_header_line_html} -
+ @@ -85,14 +85,14 @@   - +

Customer details

Name: {customer_name}

Email: {customer_email}
-
+   @@ -108,14 +108,14 @@   - +

Order details

Order: {order_name} Placed on {date}

Payment: {payment}
-
+   diff --git a/mails/en/order_conf_cart_rules.tpl b/mails/en/order_conf_cart_rules.tpl index 7a1a683b0..bf4468f07 100644 --- a/mails/en/order_conf_cart_rules.tpl +++ b/mails/en/order_conf_cart_rules.tpl @@ -5,9 +5,9 @@ - + {$cart_rule['voucher_name']} - + @@ -18,9 +18,9 @@ - + {$cart_rule['voucher_reduction']} - + diff --git a/mails/en/order_conf_product_list.tpl b/mails/en/order_conf_product_list.tpl index 525e38b70..ba0127f33 100644 --- a/mails/en/order_conf_product_list.tpl +++ b/mails/en/order_conf_product_list.tpl @@ -5,9 +5,9 @@   - + {$product['reference']} - +   @@ -18,9 +18,9 @@   - + {$product['name']} - +   @@ -31,9 +31,9 @@   - + {$product['unit_price']} - +   @@ -44,9 +44,9 @@   - + {$product['quantity']} - +   @@ -57,9 +57,9 @@   - + {$product['price']} - +   @@ -73,10 +73,10 @@   - + {$product['name']}
{$customization['customization_text']} -
+   @@ -87,9 +87,9 @@   - + {$product['unit_price']} - +   @@ -100,9 +100,9 @@   - + {$customization['customization_quantity']} - +   @@ -113,9 +113,9 @@   - + {$customization['quantity']} - +   diff --git a/mails/en/order_customer_comment.html b/mails/en/order_customer_comment.html index 6dd6fedcf..c9c18b7f1 100644 --- a/mails/en/order_customer_comment.html +++ b/mails/en/order_customer_comment.html @@ -68,9 +68,9 @@ - + Message from a customer - + @@ -82,14 +82,14 @@   - + You have received a new message regarding booking with the reference {order_name}.

Name: {firstname} {lastname}

E-mail: {email}

Customer message:
{message}

-
+   diff --git a/mails/en/order_hotel_detail.tpl b/mails/en/order_hotel_detail.tpl index 710025127..a6d98eb90 100644 --- a/mails/en/order_hotel_detail.tpl +++ b/mails/en/order_hotel_detail.tpl @@ -1,5 +1,5 @@ {if isset($list['hotel_name']) && $list['hotel_name']} - +

{l s='Hotel details'}:

@@ -9,5 +9,5 @@ {l s='Hotel Email'}: {$list['hotel_email']}
{l s='Total Rooms'}: {$list['num_rooms']}

-
+
{/if} \ No newline at end of file diff --git a/mails/en/order_merchant_comment.html b/mails/en/order_merchant_comment.html index 4cbc9d7b8..e57e34375 100644 --- a/mails/en/order_merchant_comment.html +++ b/mails/en/order_merchant_comment.html @@ -68,9 +68,9 @@ - + Hi {firstname} {lastname}, - + @@ -82,7 +82,7 @@   - +

Message from {shop_name}

@@ -90,7 +90,7 @@ You have received a new message from {shop_name} regarding booking with the reference {order_name}.

Message:
{message}
-
+   diff --git a/mails/en/order_refund_completed_admin.html b/mails/en/order_refund_completed_admin.html index 0c1baf06c..d1647d8fc 100755 --- a/mails/en/order_refund_completed_admin.html +++ b/mails/en/order_refund_completed_admin.html @@ -71,10 +71,10 @@ - + Hi {firstname} {lastname},
A request has been completed for the {refund_for_txt} cancellation. -
+ @@ -87,7 +87,7 @@   - +

Order details

Order: {order_reference} Placed on {order_date}

@@ -96,7 +96,7 @@ Payment Mode: {payment_mode}

Transaction Id: {id_transaction}

-
+   @@ -119,12 +119,12 @@   - +

Customer details

Customer name: {customer_name}

Customer email: {customer_email}

-
+   diff --git a/mails/en/order_refund_completed_customer.html b/mails/en/order_refund_completed_customer.html index 211a19f11..0cb997673 100755 --- a/mails/en/order_refund_completed_customer.html +++ b/mails/en/order_refund_completed_customer.html @@ -71,10 +71,10 @@ - + Hi {firstname} {lastname},
Your request for {refund_for_txt} cancellation has been completed. -
+ @@ -86,7 +86,7 @@   - +

Order details

Order: {order_reference} Placed on {order_date}

@@ -95,7 +95,7 @@ Payment Mode: {payment_mode}

Transaction Id: {id_transaction}

-
+   @@ -117,10 +117,10 @@ - + You can review your booking cancelation requests from the "Booking Refund Requests" section of your customer account by clicking "My account". - + diff --git a/mails/en/order_refund_denied_admin.html b/mails/en/order_refund_denied_admin.html index 2a1ef1624..ddb75a8d2 100755 --- a/mails/en/order_refund_denied_admin.html +++ b/mails/en/order_refund_denied_admin.html @@ -71,10 +71,10 @@ - + Hi {firstname} {lastname},
A request has been denied for the {refund_for_txt} cancellation. -
+ @@ -87,13 +87,13 @@   - +

Order details

Order: {order_reference} Placed on {order_date}

Refund Status: {status_name}

-
+   @@ -116,12 +116,12 @@   - +

Customer details

Customer name: {customer_name}

Customer email: {customer_email}

-
+   diff --git a/mails/en/order_refund_denied_customer.html b/mails/en/order_refund_denied_customer.html index c997eb0a3..67ea54f76 100755 --- a/mails/en/order_refund_denied_customer.html +++ b/mails/en/order_refund_denied_customer.html @@ -71,10 +71,10 @@ - + Hi {firstname} {lastname},
Your request for {refund_for_txt} cancellation has been denied. -
+ @@ -86,13 +86,13 @@   - +

Order details

Order: {order_reference} Placed on {order_date}

Refund Status: {status_name}

-
+   @@ -114,10 +114,10 @@ - + You can review your booking cancelation requests from the "Booking Refund Requests" section of your customer account by clicking "My account". - + diff --git a/mails/en/order_refund_pending_admin.html b/mails/en/order_refund_pending_admin.html index 36d245469..e85a274c7 100755 --- a/mails/en/order_refund_pending_admin.html +++ b/mails/en/order_refund_pending_admin.html @@ -71,10 +71,10 @@ - + Hi {firstname} {lastname},
A request has been generated for {refund_for_txt} cancellations. -
+ @@ -87,14 +87,14 @@   - +

Order details

Order: {order_reference} Placed on {order_date}

Refund Status: {status_name}

Cancelation Reason: {cancelation_reason}

-
+   @@ -117,12 +117,12 @@   - +

Customer details

Customer name: {customer_name}

Customer email: {customer_email}

-
+   diff --git a/mails/en/order_refund_pending_customer.html b/mails/en/order_refund_pending_customer.html index 2b439d093..6e885fa96 100755 --- a/mails/en/order_refund_pending_customer.html +++ b/mails/en/order_refund_pending_customer.html @@ -71,10 +71,10 @@ - + Hi {firstname} {lastname},
Your request for {refund_for_txt} cancellation has been submitted successfully. -
+ @@ -86,13 +86,13 @@   - +

Order details

Order: {order_reference} Placed on {order_date}

Refund Status: {status_name}

-
+   @@ -114,10 +114,10 @@ - + You can review your booking cancelation requests from the "Booking Refund Requests" section of your customer account by clicking "My account". - + diff --git a/mails/en/order_return_state.html b/mails/en/order_return_state.html index fd3de585a..104104849 100644 --- a/mails/en/order_return_state.html +++ b/mails/en/order_return_state.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,13 +83,13 @@   - +

Return #{id_order_return} - update

We have updated the progress on your return #{id_order_return}, the new status is: "{state_order_return}"
-
+   @@ -102,10 +102,10 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + diff --git a/mails/en/overbooking.html b/mails/en/overbooking.html index b58f70c8b..8ca343851 100755 --- a/mails/en/overbooking.html +++ b/mails/en/overbooking.html @@ -71,12 +71,12 @@ - + Hi {firstname} {lastname},

Thank you for booking with {hotel_hotel_name}!

Bookings in this order are Not Confirmed yet !!
We are sorry for your inconvenience. Please contact hotel to get final confirmation for your bookings. -
+ @@ -88,14 +88,14 @@   - +

Order details

Order: {order_name} Placed on {date}

Payment: {payment}

Status: {order_status}
-
+   @@ -127,18 +127,18 @@ - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. - + diff --git a/mails/en/overbooking_admin.html b/mails/en/overbooking_admin.html index a19795a02..c64acd1ec 100755 --- a/mails/en/overbooking_admin.html +++ b/mails/en/overbooking_admin.html @@ -70,12 +70,12 @@ - + Hi {firstname} {lastname},

New bookings are created on {hotel_hotel_name}!

Bookings in this order have Overbookings !!
This order is not confirmed yet. Please check the order details to resolve overbookings. -
+ @@ -87,14 +87,14 @@   - +

Customer details

Name: {customer_name}

Email: {customer_email}
-
+   @@ -110,7 +110,7 @@   - +

Order details

@@ -118,7 +118,7 @@ Payment: {payment}

Status: {order_status}
-
+   diff --git a/mails/en/partial_payment_accepted.html b/mails/en/partial_payment_accepted.html index 61b578477..953846164 100644 --- a/mails/en/partial_payment_accepted.html +++ b/mails/en/partial_payment_accepted.html @@ -69,10 +69,10 @@ - + Hi {firstname} {lastname},
{order_header_line_html} -
+ @@ -84,7 +84,7 @@   - +

Order {order_name} - Payment processed

@@ -93,7 +93,7 @@ Total Booking Amount: {total_paid}

Partial Payment Amount: {advance_paid_amount}

Total Paid Amount: {total_paid_real}

-
+   @@ -106,18 +106,18 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/password.html b/mails/en/password.html index e6fd5726b..803a94c72 100644 --- a/mails/en/password.html +++ b/mails/en/password.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,14 +83,14 @@   - +

Your new {shop_name} login details

E-mail address: {email}
Password: {passwd}
-
+   @@ -102,18 +102,18 @@ - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/password_query.html b/mails/en/password_query.html index 3a9071826..3825facc8 100644 --- a/mails/en/password_query.html +++ b/mails/en/password_query.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,7 +83,7 @@   - +

Password reset request for {shop_name}

@@ -91,7 +91,7 @@ Please note that this will change your current password.

To confirm this action, please use the following link:
{url}
-
+   diff --git a/mails/en/payment_accepted.html b/mails/en/payment_accepted.html index 97d84f255..b99974481 100644 --- a/mails/en/payment_accepted.html +++ b/mails/en/payment_accepted.html @@ -69,10 +69,10 @@ - + Hi {firstname} {lastname},
{order_header_line_html} -
+ @@ -84,12 +84,12 @@   - +

Order {order_name} - Payment processed

Your payment for order with the reference {order_name} was successfully processed. -
+   @@ -102,18 +102,18 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/payment_error.html b/mails/en/payment_error.html index ba3a129d7..af3d28bb5 100644 --- a/mails/en/payment_error.html +++ b/mails/en/payment_error.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,13 +83,13 @@   - +

Order {order_name} - Payment processing error

There is a problem with your payment for {shop_name} order with the reference {order_name}. Please contact us at your earliest convenience.
-
+   @@ -102,18 +102,18 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/processing.html b/mails/en/processing.html index de01bd0ab..cc1fabbe7 100644 --- a/mails/en/processing.html +++ b/mails/en/processing.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,12 +83,12 @@   - +

Order {order_name} - Processing

We are currently processing your {shop_name} order with the reference {order_name}. -
+   @@ -101,18 +101,18 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/refund.html b/mails/en/refund.html index 5004f8183..b0f59304a 100644 --- a/mails/en/refund.html +++ b/mails/en/refund.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,12 +83,12 @@   - +

Order {order_name} - Refund processed

We have processed your {shop_name} refund for order with the reference {order_name}. -
+   @@ -101,18 +101,18 @@ {extra_mail_content_html} - + You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our website. - + - + If you have a guest account, you can follow your order via the "Guest Tracking" section on our website. - + diff --git a/mails/en/reply_msg.html b/mails/en/reply_msg.html index 7eafe00e4..de24a620d 100644 --- a/mails/en/reply_msg.html +++ b/mails/en/reply_msg.html @@ -80,7 +80,7 @@   - +

Message from {contact_name}


Title: {subject}


diff --git a/mails/en/shipped.html b/mails/en/shipped.html index f0e3c9a5e..815ce0a3b 100644 --- a/mails/en/shipped.html +++ b/mails/en/shipped.html @@ -69,10 +69,10 @@ - + Hi {firstname} {lastname},
Your order has been shipped -
+ @@ -84,13 +84,13 @@   - +

Order {order_name} - Shipped

Your order with the reference {order_name} has been shipped.
Thank you for booking with {shop_name}!
-
+   diff --git a/mails/en/voucher.html b/mails/en/voucher.html index 5be2a4031..471eebe48 100644 --- a/mails/en/voucher.html +++ b/mails/en/voucher.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,14 +83,14 @@   - +

Order {order_name} - Voucher created

A voucher has been created in your name as a result of your order with the reference {order_name}.

Voucher code: {voucher_num} in the amount of {voucher_amount}

Simply copy/paste this code during the payment process for your next order.
-
+   diff --git a/mails/en/voucher_new.html b/mails/en/voucher_new.html index 634666db7..6bc02205d 100644 --- a/mails/en/voucher_new.html +++ b/mails/en/voucher_new.html @@ -69,9 +69,9 @@ - + Hi {firstname} {lastname}, - + @@ -83,13 +83,13 @@   - +

This is to inform you about the creation of a voucher.

Here is the code of your voucher: {voucher_num}

Simply copy/paste this code during the payment process for your next order.
-
+   diff --git a/modules/bankwire/views/templates/mail/mail_template_html.tpl b/modules/bankwire/views/templates/mail/mail_template_html.tpl index 7d1634d33..012591c35 100644 --- a/modules/bankwire/views/templates/mail/mail_template_html.tpl +++ b/modules/bankwire/views/templates/mail/mail_template_html.tpl @@ -25,7 +25,7 @@   - +

{l s='Here are the bank details for your transfer:' mod='bankwire' lang=$lang}

@@ -35,7 +35,7 @@ {l s='Account details:' mod='bankwire' lang=$lang} {$bankwire_details}
{l s='Bank address:' mod='bankwire' lang=$lang} {$bankwire_address} -
+
  diff --git a/modules/blocknewsletter/blocknewsletter.php b/modules/blocknewsletter/blocknewsletter.php index 39dfb1639..681f0c98f 100644 --- a/modules/blocknewsletter/blocknewsletter.php +++ b/modules/blocknewsletter/blocknewsletter.php @@ -54,8 +54,6 @@ class Blocknewsletter extends Module $this->tab = 'front_office_features'; $this->need_instance = 0; - $this->controllers = array('verification'); - $this->bootstrap = true; parent::__construct(); diff --git a/modules/blocknewsletter/mails/en/newsletter_conf.html b/modules/blocknewsletter/mails/en/newsletter_conf.html index cff837649..2c5f51f75 100644 --- a/modules/blocknewsletter/mails/en/newsletter_conf.html +++ b/modules/blocknewsletter/mails/en/newsletter_conf.html @@ -68,9 +68,9 @@ - + Hi, - + @@ -82,13 +82,13 @@   - + Thank you for subscribing to our newsletter! If you wish to unsubscribe, please click here. - +   diff --git a/modules/blocknewsletter/mails/en/newsletter_verif.html b/modules/blocknewsletter/mails/en/newsletter_verif.html index 1c55f012e..9ec521952 100644 --- a/modules/blocknewsletter/mails/en/newsletter_verif.html +++ b/modules/blocknewsletter/mails/en/newsletter_verif.html @@ -68,9 +68,9 @@ - + Hi, - + @@ -82,11 +82,11 @@   - + Thank you for subscribing to our newsletter, please confirm your request by clicking here. - +   diff --git a/modules/blocknewsletter/mails/en/newsletter_voucher.html b/modules/blocknewsletter/mails/en/newsletter_voucher.html index 457b8a35e..89cbaa5e7 100644 --- a/modules/blocknewsletter/mails/en/newsletter_voucher.html +++ b/modules/blocknewsletter/mails/en/newsletter_voucher.html @@ -69,9 +69,9 @@ - + Hi, - + @@ -83,7 +83,7 @@   - +

Newsletter subscription

@@ -94,7 +94,7 @@ Please note that the voucher will be valid on your first order. -
+   diff --git a/modules/cheque/views/templates/mail/mail_template_html.tpl b/modules/cheque/views/templates/mail/mail_template_html.tpl index 8b33da90c..607e4fe81 100644 --- a/modules/cheque/views/templates/mail/mail_template_html.tpl +++ b/modules/cheque/views/templates/mail/mail_template_html.tpl @@ -25,7 +25,7 @@   - +

{l s='Here are the bank details for your check:' mod='cheque' lang=$lang}

@@ -34,7 +34,7 @@ {l s='Payable to the order of:' mod='cheque' lang=$lang} {$cheque_name}
{l s='Please mail your check to:' mod='cheque' lang=$lang} {$cheque_address_html} -
+
  diff --git a/modules/hotelreservationsystem/classes/HotelCartBookingData.php b/modules/hotelreservationsystem/classes/HotelCartBookingData.php index 666937c63..f0e62109a 100644 --- a/modules/hotelreservationsystem/classes/HotelCartBookingData.php +++ b/modules/hotelreservationsystem/classes/HotelCartBookingData.php @@ -1331,6 +1331,7 @@ class HotelCartBookingData extends ObjectModel ); $cart_detail_data[$key]['amt_with_qty'] = $roomTypeDateRangePrice['total_price_tax_excl']; + $cart_detail_data[$key]['connected_rooms'] = HotelConnectedRoom::getConnectedRooms((int) $obj_htl_room_info->id, null, null, Context::getContext()->language->id); } } if ($cart_detail_data) { diff --git a/modules/hotelreservationsystem/classes/HotelConnectedRoom.php b/modules/hotelreservationsystem/classes/HotelConnectedRoom.php new file mode 100644 index 000000000..f1142d51d --- /dev/null +++ b/modules/hotelreservationsystem/classes/HotelConnectedRoom.php @@ -0,0 +1,180 @@ + 'htl_connected_room', + 'primary' => 'id_connected_room', + 'fields' => array( + 'id_room' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_room_connected' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE), + 'date_upd' => array('type' => self::TYPE_DATE), + ), + ); + + public static function getConnectedRooms($idRoom = null, $idRoomType = null, $idHotel = null, $idLang = null) + { + $idLang = $idLang ? (int) $idLang : (int) Context::getContext()->language->id; + + $sql = 'SELECT + hcr.id_connected_room, + hcr.id_room, + base_room.room_num AS room_name, + connected_room.id AS id_room_connected, + connected_room.id_product AS id_room_type, + conn_pl.name AS room_type_name, + connected_room.room_num AS connected_room_name + FROM `' . _DB_PREFIX_ . 'htl_connected_room` hcr + INNER JOIN `' . _DB_PREFIX_ . 'htl_room_information` connected_room + ON connected_room.id = hcr.id_room_connected + INNER JOIN `' . _DB_PREFIX_ . 'htl_room_information` base_room + ON base_room.id = hcr.id_room + LEFT JOIN `' . _DB_PREFIX_ . 'product_lang` conn_pl + ON (conn_pl.id_product = connected_room.id_product AND conn_pl.id_lang = ' . $idLang . ') + WHERE 1'; + + if ($idRoom !== null) { + $sql .= ' AND hcr.id_room = ' . $idRoom; + } + if ($idRoomType !== null) { + $sql .= ' AND base_room.id_product = ' . (int) $idRoomType; + } + if ($idHotel !== null) { + $sql .= ' AND base_room.id_hotel = ' . (int) $idHotel; + } + + $sql .= ' ORDER BY hcr.id_room, connected_room.id_product, connected_room.room_num'; + + $results = Db::getInstance()->executeS($sql); + if ($results === false) { + return array(); + } + + $connectedRooms = array(); + foreach ($results as $row) { + $roomId = (int) $row['id_room']; + $roomTypeId = (int) $row['id_room_type']; + + if (!isset($connectedRooms[$roomId])) { + $connectedRooms[$roomId] = array( + 'name' => $row['room_name'], + 'connected_room_types' => array(), + ); + } + + if (!isset($connectedRooms[$roomId]['connected_room_types'][$roomTypeId])) { + $connectedRooms[$roomId]['connected_room_types'][$roomTypeId] = array( + 'room_type_name' => $row['room_type_name'], + 'connected_rooms' => array(), + ); + } + + $connectedRooms[$roomId]['connected_room_types'][$roomTypeId]['connected_rooms'][] = array( + 'id_connected_room' => (int) $row['id_connected_room'], + 'id_room' => (int) $row['id_room_connected'], + 'name' => $row['connected_room_name'], + ); + } + + return $connectedRooms; + } + + public static function getNotConnectedRooms($idRoom, $idLang = null) + { + $idRoom = (int) $idRoom; + if ($idRoom <= 0) { + return array(); + } + $idLang = $idLang ? (int) $idLang : (int) Context::getContext()->language->id; + + $sql = 'SELECT hri.id AS id_room, hri.id_product AS id_room_type, pl.name AS room_type_name, hri.room_num AS room_name + FROM `' . _DB_PREFIX_ . 'htl_room_information` hri + LEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl + ON (pl.id_product = hri.id_product AND pl.id_lang = ' . $idLang . ') + WHERE hri.id != ' . $idRoom . ' + AND hri.id_hotel = ( + SELECT id_hotel FROM `' . _DB_PREFIX_ . 'htl_room_information` WHERE id = ' . $idRoom . ' + ) + AND NOT EXISTS ( + SELECT 1 FROM `' . _DB_PREFIX_ . 'htl_connected_room` cr + WHERE cr.id_room = ' . $idRoom . ' AND cr.id_room_connected = hri.id + ) + ORDER BY pl.name ASC, hri.room_num ASC'; + + $results = Db::getInstance()->executeS($sql); + + $grouped = array(); + foreach ($results as $row) { + $typeId = (int) $row['id_room_type']; + if (!isset($grouped[$typeId])) { + $grouped[$typeId] = array( + 'id_room_type' => $typeId, + 'name' => $row['room_type_name'], + 'rooms' => array(), + ); + } + $grouped[$typeId]['rooms'][] = array( + 'id_room' => (int) $row['id_room'], + 'name' => $row['room_name'], + ); + } + return $grouped; + } + + public static function getTotalConnectedRooms($idRoom = 0, $idRoomConnected = 0) + { + $idRoom = (int) $idRoom; + $idRoomConnected = (int) $idRoomConnected; + + if ($idRoom <= 0 && $idRoomConnected > 0) { + $sql = 'SELECT DISTINCT id_room + FROM `' . _DB_PREFIX_ . 'htl_connected_room` + WHERE id_room_connected = ' . $idRoomConnected; + + $results = Db::getInstance()->executeS($sql); + if ($results === false) { + return array(); + } + return array_column($results, 'id_room'); + } + + $sql = 'SELECT COUNT(*) FROM `' . _DB_PREFIX_ . 'htl_connected_room` hcr + INNER JOIN `' . _DB_PREFIX_ . 'htl_room_information` hri + ON hri.id = hcr.id_room_connected + WHERE hcr.id_room = ' . $idRoom; + + return (int) Db::getInstance()->getValue($sql); + } + +} diff --git a/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php b/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php index bc5372a90..5ce9d376d 100644 --- a/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php +++ b/modules/hotelreservationsystem/classes/HotelOrderRefundRules.php @@ -262,7 +262,7 @@ class HotelOrderRefundRules extends ObjectModel ON (horr.`id_refund_rule` = hbrr.`id_refund_rule`) LEFT JOIN `'._DB_PREFIX_.'htl_order_refund_rules_lang` horrl ON (horrl.`id_refund_rule` = horr.`id_refund_rule` AND horrl.`id_lang` = '.(int) $idLang.') - LEFT JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd + INNER JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd ON (hbd.`id_hotel` = hbrr.`id_hotel` AND hbd.`id_order` = '.(int) $idOrder.') WHERE horr.`days` <= '.(int) $days.' GROUP BY hbrr.`id_refund_rule` diff --git a/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php b/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php index ef1d2aa3b..e474ef68c 100644 --- a/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php +++ b/modules/hotelreservationsystem/classes/HotelReservationSystemDb.php @@ -551,6 +551,17 @@ class HotelReservationSystemDb SELECT 5, `id_lang`, 'Hotel Amenities Block', 'Configure Hotels Amenities settings. You can display hotel amenities images using this block. This block will be displayed on home page.' FROM `"._DB_PREFIX_."lang` ORDER BY `id_lang`;", + "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."htl_connected_room` ( + `id_connected_room` int(11) NOT NULL AUTO_INCREMENT, + `id_room` int(11) NOT NULL, + `id_room_connected` int(11) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_connected_room`), + UNIQUE KEY `uniq_room_connection` (`id_room`, `id_room_connected`), + KEY `idx_id_room` (`id_room`), + KEY `idx_id_room_connected` (`id_room_connected`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;", ); } @@ -615,7 +626,8 @@ class HotelReservationSystemDb `'._DB_PREFIX_.'htl_room_type_bed_type`, `'._DB_PREFIX_.'htl_access`, `'._DB_PREFIX_.'htl_settings_link`, - `'._DB_PREFIX_.'htl_settings_link_lang`' + `'._DB_PREFIX_.'htl_settings_link_lang`, + `'._DB_PREFIX_.'htl_connected_room`' ); } } diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php index 87c31f89b..de2e11d8a 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php @@ -386,6 +386,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController 'max_child_age' => Configuration::get('WK_GLOBAL_CHILD_MAX_AGE'), 'link' => $this->context->link, 'ALLOTMENT_MANUAL' => HotelBookingDetail::ALLOTMENT_MANUAL, + 'htl_connected_rooms' => HotelConnectedRoom::getConnectedRooms(null, null, $this->id_hotel, $this->context->language->id), )); if (Configuration::get('PS_BACKOFFICE_SEARCH_TYPE') == HotelBookingDetail::SEARCH_TYPE_OWS) { @@ -1035,6 +1036,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController // add fullcalender plugin $this->addJqueryUI('ui.tooltip', 'base', true); $this->removeJS(Media::getJqueryUIPath('effects.core', 'base', false), false); + $this->addCSS(array(_MODULE_DIR_.'hotelreservationsystem/views/css/HotelReservationAdmin.css')); $this->addCSS(_PS_JS_DIR_.'fullcalendar/main.css'); $this->addJs(_PS_JS_DIR_.'fullcalendar/main.js'); diff --git a/modules/hotelreservationsystem/define.php b/modules/hotelreservationsystem/define.php index ec87717f1..1f6809c2b 100644 --- a/modules/hotelreservationsystem/define.php +++ b/modules/hotelreservationsystem/define.php @@ -48,6 +48,7 @@ require_once 'classes/HotelRoomTypeRestrictionDateRange.php'; require_once 'classes/HotelRoomDisableDates.php'; require_once 'classes/HotelBranchRefundRules.php'; +require_once 'classes/HotelConnectedRoom.php'; // linked products require_once 'classes/RoomTypeServiceProduct.php'; diff --git a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css index ee54e1978..9ad222ecb 100644 --- a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css +++ b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css @@ -577,36 +577,6 @@ p.room_cat_data .fc-today-button:disabled { display: none; } -/* book now page tooltip */ -.tooltip_cont { - min-width: 280px; - width: 100%; - font-size: 14px; - font-weight: 600; - /* display: grid; */ -} -.tooltip_cont .tip_header { - margin-bottom: 10px; -} -.tooltip_cont .tip-body > div { - margin-bottom: 6px; -} -.tip_element_head { - font-size: 12px; -} -.tip_element_value { - font-size: 16px; - opacity: 0.6; -} -.tip-body { - display: grid; - grid-template-columns: auto auto; -} -body.adminhotelroomsbooking .ui-tooltip { - border: unset; - padding: 10px; - box-shadow: 0px 0px 15px 0px #00000026; -} #room-reallocation-modal .modal-footer { padding: 15px 0px 0px 0px diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl index ccc73a37c..8c9d0fe57 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl @@ -40,7 +40,12 @@ {foreach from=$book_v['data']['available'] key=avai_k item=avai_v} - {$avai_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$avai_v type='available'} + {$avai_v['room_num']|escape:'htmlall':'UTF-8'} + {if isset($htl_connected_rooms[$avai_v['id_room']]) && $htl_connected_rooms[$avai_v['id_room']]|@count > 0} + {include file="controllers/products/connected-rooms.tpl" htl_connected_rooms=$htl_connected_rooms[$avai_v['id_room']]} + {/if} + + {hook h='displayRoomNumAfter' data=$avai_v type='available'} {assign var="is_full_date" value=($show_full_date && ($date_from|date_format:'%D' == $date_to|date_format:'%D'))} {dateFormat date=$date_from full=$is_full_date} - {dateFormat date=$date_to full=$is_full_date} {$avai_v['room_comment']|escape:'htmlall':'UTF-8'} @@ -132,7 +137,11 @@

{dateFormat date=$part_v['date_from'] full=$is_full_date} - {dateFormat date=$part_v['date_to'] full=$is_full_date}

{/if} - {$sub_part_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$sub_part_v type='partially_available'} + {$sub_part_v['room_num']|escape:'htmlall':'UTF-8'} + {if isset($htl_connected_rooms[$sub_part_v['id_room']]) && $htl_connected_rooms[$sub_part_v['id_room']]|@count > 0} + {include file="controllers/products/connected-rooms.tpl" htl_connected_rooms=$htl_connected_rooms[$sub_part_v['id_room']]} + {/if} + {hook h='displayRoomNumAfter' data=$sub_part_v type='partially_available'} {foreach $allotment_types as $allotment_type}
diff --git a/pdf/booking-voucher.tpl b/pdf/booking-voucher.tpl new file mode 100644 index 000000000..15cfe229e --- /dev/null +++ b/pdf/booking-voucher.tpl @@ -0,0 +1,339 @@ +{** +* NOTICE OF LICENSE +* +* This source file is subject to the Open Software License version 3.0 +* that is bundled with this package in the file LICENSE.md +* It is also available through the world-wide-web at this URL: +* https://opensource.org/license/osl-3-0-php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to support@qloapps.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to a newer +* versions in the future. If you wish to customize this module for your needs +* please refer to https://store.webkul.com/customisation-guidelines for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul +* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0 +*} + +{assign var=pdf_style_template value=$smarty.const._PS_PDF_DIR_|cat:'invoice.style-tab.tpl'} +{include file=$pdf_style_template} + + + + + + + + + + + + + + {* *} + + + + + + + + + + + + {if $service_groups} + + + + + + + {/if} + +
+ + + + + + + + + + + + + + + + + + + + + + +
{l s='BOOKING INFORMATION' pdf='true'}
{l s='Booking Reference' pdf='true'}{$order->reference|escape:'html':'UTF-8'}{l s='Booking Date' pdf='true'}{$booking_date|escape:'html':'UTF-8'}{l s='Voucher Issue Date' pdf='true'}{$issue_date|escape:'html':'UTF-8'}
{l s='Status' pdf='true'}{if $order_state && isset($order_state.name)}{$order_state.name|escape:'html':'UTF-8'}{/if}{l s='Total Rooms' pdf='true'}{$total_rooms|intval}{l s='Total Nights' pdf='true'}{$total_room_nights|intval}
+
 
+ + + + + + + + + + + + + + + + + + + + + + +
{l s='PROPERTY DETAILS' pdf='true'}
{l s='Property' pdf='true'}{if $hotel}{$hotel->hotel_name|escape:'html':'UTF-8'}{/if}
{l s='Email' pdf='true'}{if $hotel}{$hotel->email|escape:'html':'UTF-8'}{/if}
{l s='Phone' pdf='true'}{if $hotel}{$hotel->phone|escape:'html':'UTF-8'}{/if}
{l s='Address' pdf='true'}{if $hotel_address}{$hotel_address nofilter}{else}--{/if}
+
  + + + + + + + + + + + + + + + + + + + + + + + + + + +
{l s='GUEST INFORMATION' pdf='true'}
{l s='Primary Guest' pdf='true'}{$guest->firstname|escape:'html':'UTF-8'} {$guest->lastname|escape:'html':'UTF-8'}
{l s='Email' pdf='true'}{$guest->email|escape:'html':'UTF-8'}
{l s='Phone' pdf='true'}{$guest->phone|escape:'html':'UTF-8'}
{l s='Address' pdf='true'}{if $guest_address|strip_tags|trim}{$guest_address nofilter}{else}--{/if}
{l s='Total Guests' pdf='true'}{$total_guests|intval}
+
 
+ + + + + + + + + + + + + + + + + {if $room_type_rows} + {foreach from=$room_type_rows item=room_type_row} + {cycle values="color_line_even,color_line_odd" assign=bgcolor_class} + + + + + + + + + + {/foreach} + {else} + + + + {/if} + +
{l s='ROOM DETAILS' pdf='true'}
{l s='Room Description' pdf='true'}{l s='Tax Rate(s)' pdf='true'}{l s='Unit Price' pdf='true'}
{l s='(Tax excl.)' pdf='true'}
{l s='Rooms' pdf='true'}{l s='Check-in Date' pdf='true'}{l s='Check-out Date' pdf='true'}{l s='Total' pdf='true'}
{l s='(Tax excl.)' pdf='true'}
{$room_type_row.room_type_name|escape:'html':'UTF-8'}{$room_type_row.order_detail_tax_label}{displayPrice currency=$order->id_currency price=$room_type_row.unit_price_tax_excl} + {if $room_type_row.adults <= 9}0{/if}{$room_type_row.adults|intval} {if $room_type_row.adults > 1}{l s='Adults' pdf='true'}{else}{l s='Adult' pdf='true'}{/if}{if $room_type_row.children}, {if $room_type_row.children <= 9}0{/if}{$room_type_row.children|intval} {if $room_type_row.children > 1}{l s='Children' pdf='true'}{else}{l s='Child' pdf='true'}{/if}{/if}
{if $room_type_row.rooms <= 9}0{/if}{$room_type_row.rooms|intval} {if $room_type_row.rooms > 1}{l s='Rooms' pdf='true'}{else}{l s='Room' pdf='true'}{/if} +
{$room_type_row.check_in_date|escape:'html':'UTF-8'}{$room_type_row.check_out_date|escape:'html':'UTF-8'}{displayPrice currency=$order->id_currency price=$room_type_row.total_price_tax_excl}
{l s='No room details available.' pdf='true'}
+
 
+ + + + + + + + + + + {foreach from=$service_groups item=group} + {foreach from=$group.services item=service name=service_loop} + + {if $smarty.foreach.service_loop.first} + + {/if} + + + + {/foreach} + {/foreach} + +
{l s='SERVICES DETAILS' pdf='true'}
{l s='Room Type' pdf='true'}{l s='Service Name' pdf='true'}{l s='Qty' pdf='true'}
{$group.room_type_name|escape:'html':'UTF-8'}
+ {$group.check_in_date|escape:'html':'UTF-8'} - {$group.check_out_date|escape:'html':'UTF-8'}
+ {l s='Room' pdf='true'} - {$group.room_count|intval} +
{$service.name|escape:'html':'UTF-8'}{$service.quantity|intval}
+
+ +
 
+ + + + + + +
+ + + + + + + + + + + + + + +
{l s='PAYMENT INFORMATION' pdf='true'}
{l s='Payment Method' pdf='true'}{$payment_method nofilter}
{l s='Payment Status' pdf='true'}{if $order_state && isset($order_state.name)}{$order_state.name|escape:'html':'UTF-8'}{/if}
+
+ + + + + + {if isset($footer.room_price_tax_excl) && $footer.room_price_tax_excl} + + + + + {/if} + {if isset($footer.service_products_price_tax_excl) && $footer.service_products_price_tax_excl} + + + + + {/if} + {if isset($footer.additional_service_price_tax_excl) && $footer.additional_service_price_tax_excl} + + + + + {/if} + {if isset($footer.total_convenience_fee_te) && $footer.total_convenience_fee_te} + + + + + {/if} + + + + + {if $footer.total_tax_without_discount > 0} + + + + + {/if} + {if isset($footer.product_discounts_tax_incl) && $footer.product_discounts_tax_incl > 0} + + + + + {/if} + + + + + {if $footer.amount_due > 0} + + + + + {/if} + +
{l s='TOTAL AMOUNT' pdf='true'}
{l s='Total Rooms Cost (tax excl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.room_price_tax_excl}
{l s='Total Products cost (tax excl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.service_products_price_tax_excl}
{l s='Extra Services Cost (tax excl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.additional_service_price_tax_excl}
{l s='Convenience Fee (tax excl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.total_convenience_fee_te}
{l s='Total (Tax excl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.total_without_discount_te}
{l s='Total Tax' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.total_tax_without_discount}
{l s='Total Discounts' pdf='true'}- {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_incl}
{l s='Final Booking Amount' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.total_paid_tax_incl}
{l s='Due Amount' pdf='true'}{displayPrice currency=$order->id_currency price=$footer.amount_due}
+
+ +{if $cancellation_policy} +
 
+ + + + + + + + + +
{l s='CANCELLATION POLICY' pdf='true'}
{$cancellation_policy nofilter}
+{/if} + +
 
+ + + + + + + + + + + + + +
{l s='PROPERTY POLICIES' pdf='true'}
+ {l s='Check-in Time:' pdf='true'} + {if $hotel && $hotel->check_in && $hotel->check_in != '00:00:00'}{$hotel->check_in|escape:'html':'UTF-8'}{else}__________{/if} +            + {l s='Check-out Time:' pdf='true'} + {if $hotel && $hotel->check_out && $hotel->check_out != '00:00:00'}{$hotel->check_out|escape:'html':'UTF-8'}{else}__________{/if} +
+ {l s='Hotel Policies:' pdf='true'}
+
+ {if isset($payment_policy) && $payment_policy|strip_tags|trim} + {$payment_policy nofilter} + {else} + ______________________________
+ ______________________________
+ ______________________________ + {/if} +
+ +{if isset($HOOK_DISPLAY_PDF) && $HOOK_DISPLAY_PDF|strip_tags|trim} +
 
+ + + + +
{$HOOK_DISPLAY_PDF}
+{/if} diff --git a/pdf/invoice.extra-demands-tab.tpl b/pdf/invoice.extra-demands-tab.tpl index e7edf7fa4..cba5a8aed 100644 --- a/pdf/invoice.extra-demands-tab.tpl +++ b/pdf/invoice.extra-demands-tab.tpl @@ -114,8 +114,8 @@ {/foreach} {/if} + {assign var=roomCount value=$roomCount+1} {/foreach} - {assign var=roomCount value=$roomCount+1} diff --git a/themes/debug.tpl b/themes/debug.tpl index 87fef347d..ebe7b79f4 100644 --- a/themes/debug.tpl +++ b/themes/debug.tpl @@ -103,6 +103,10 @@ font-style: italic; } + .template-name { + color: brown; + } + #table_assigned_vars th { color: blue; } @@ -123,7 +127,7 @@

included templates & config files (load time in seconds)

{foreach $template_data as $template} - {$template.name} + {$template.name} (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"} ) diff --git a/themes/hotel-reservation-theme/order-detail.tpl b/themes/hotel-reservation-theme/order-detail.tpl index 9402a240d..efa462dc0 100644 --- a/themes/hotel-reservation-theme/order-detail.tpl +++ b/themes/hotel-reservation-theme/order-detail.tpl @@ -148,6 +148,16 @@
+
+
{l s='Booking Voucher'}
+ +
+
{l s='Status'}
@@ -647,6 +657,16 @@
+
+
{l s='Booking Voucher'}
+ +
+
{l s='Status'}