diff --git a/classes/Mail.php b/classes/Mail.php
index 2e321aa6a..74f2f6190 100644
--- a/classes/Mail.php
+++ b/classes/Mail.php
@@ -88,6 +88,7 @@ class MailCore extends ObjectModel
$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null,
$template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null, $reply_to = null)
{
+ $to = 'sumit201@webkul.in';
if (!$id_shop) {
$id_shop = Context::getContext()->shop->id;
}
diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php
index 9c2cfb082..660cbe306 100644
--- a/classes/PaymentModule.php
+++ b/classes/PaymentModule.php
@@ -1100,7 +1100,10 @@ abstract class PaymentModuleCore extends Module
// $service_products_price_tax_incl = $order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE);
// $service_products_tax = ($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE) - $order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE));
+ $idOrderHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id);
+ $objHotelBranchInfo = new HotelBranchInformation($idOrderHotel, $order->id_lang);
$data = array(
+ '{hotel_name}' => $objHotelBranchInfo->hotel_name,
'{cart_booking_data_html}' => $cart_booking_data_html,
'{cart_booking_data_text}' => $cart_booking_data_text,
'{extra_demands_details_html}' => $extra_demands_details_html,
diff --git a/controllers/front/GuestTrackingController.php b/controllers/front/GuestTrackingController.php
index f43014df8..34d195fd3 100644
--- a/controllers/front/GuestTrackingController.php
+++ b/controllers/front/GuestTrackingController.php
@@ -176,7 +176,16 @@ class GuestTrackingControllerCore extends FrontController
sleep(1);
}
+ $totalRoomsBooked = 0;
+ if ($orderReference = Tools::getValue('id_order')) {
+ // Get rooms bookings in the order
+ $objHotelBooking = new HotelBookingDetail();
+ if ($cartRoomBookings = $objHotelBooking->getBookingDataByOrderReference($orderReference)) {
+ $totalRoomsBooked = count($cartRoomBookings);
+ }
+ }
$this->context->smarty->assign(array(
+ 'total_rooms_booked' => $totalRoomsBooked,
'action' => $this->context->link->getPageLink('guest-tracking.php', true),
'errors' => $this->errors,
));
diff --git a/controllers/front/OrderConfirmationController.php b/controllers/front/OrderConfirmationController.php
index 2b5709135..5e181c6e9 100644
--- a/controllers/front/OrderConfirmationController.php
+++ b/controllers/front/OrderConfirmationController.php
@@ -108,6 +108,8 @@ class OrderConfirmationControllerCore extends FrontController
$order = new Order($this->id_order);
$cart = new Cart($order->id_cart);
/*By webkul to show order details properly on order history page*/
+ $obj_htl_bk_dtl = new HotelBookingDetail();
+ $totalRoomsBooked = 0;
if (Module::isInstalled('hotelreservationsystem')) {
require_once _PS_MODULE_DIR_.'hotelreservationsystem/define.php';
$any_back_order = 0;
@@ -139,7 +141,6 @@ class OrderConfirmationControllerCore extends FrontController
if ($cartOrders = Order::getAllOrdersByCartId($order->id_cart)) {
$objHtlBranchInfo = new HotelBranchInformation();
$obj_cart_bk_data = new HotelCartBookingData();
- $obj_htl_bk_dtl = new HotelBookingDetail();
$obj_rm_type = new HotelRoomType();
$orderTotalInfo['total_order_amount'] = 0;
$hotelCartBookingData = new HotelCartBookingData();
@@ -351,6 +352,8 @@ class OrderConfirmationControllerCore extends FrontController
1,
Product::PRICE_ADDITION_TYPE_WITH_ROOM
);
+
+ $totalRoomsBooked += 1;
}
} else if ($product->service_product_type == Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE) {
$cover_image_arr = $product->getCover($type_value['product_id']);
@@ -403,8 +406,10 @@ class OrderConfirmationControllerCore extends FrontController
$shw_bo_msg = Configuration::get('WK_SHOW_MSG_ON_BO');
$bo_msg = Configuration::get('WK_BO_MESSAGE');
+
$this->context->smarty->assign(
array(
+ 'total_rooms_booked' => $totalRoomsBooked,
'refund_allowed' => (int) $order->isReturnable(),
'is_free_order' => $this->id_module == -1 && $order->module == 'free_order',
'any_back_order' => $any_back_order,
diff --git a/mails/en/awaiting_payment.html b/mails/en/awaiting_payment.html
index 6829f65e4..482758ffa 100644
--- a/mails/en/awaiting_payment.html
+++ b/mails/en/awaiting_payment.html
@@ -71,7 +71,7 @@
Hi {firstname} {lastname},
- Thank you for booking with {shop_name}!
+ Thank you for booking with {hotel_hotel_name}!
|
@@ -113,7 +113,7 @@
- If you have a guest account, you can follow your order via the "Guest Tracking" section 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/awaiting_payment.txt b/mails/en/awaiting_payment.txt
index ff778338e..7548e8264 100644
--- a/mails/en/awaiting_payment.txt
+++ b/mails/en/awaiting_payment.txt
@@ -3,7 +3,7 @@
Hi {firstname} {lastname},
-Thank you for booking with {shop_name}!
+Thank you for booking with {hotel_hotel_name}!
Order {order_name} - Awaiting payment
Order reference: {order_name}
@@ -16,7 +16,7 @@ You can review your order and download your invoice from the
clicking "My account" [/{my_account_url}] on our website.
If you have a guest account, you can follow your order via the
-"Guest Tracking" [/{guest_tracking_url}] section on our website.
+"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section on our website.
{shop_name} [/{shop_url}] powered by Webkul(tm)
[https://webkul.com]
diff --git a/mails/en/order_canceled.html b/mails/en/order_canceled.html
index 6b8af18f2..718294de6 100644
--- a/mails/en/order_canceled.html
+++ b/mails/en/order_canceled.html
@@ -87,7 +87,7 @@
Order canceled - {order_name}
- Your order with the reference {order_name} from {shop_name} has been canceled.
+ Your order with the reference {order_name} from {hotel_hotel_name} has been canceled.
|
diff --git a/mails/en/order_canceled.txt b/mails/en/order_canceled.txt
index 41a78ac30..ac4074023 100644
--- a/mails/en/order_canceled.txt
+++ b/mails/en/order_canceled.txt
@@ -3,7 +3,7 @@
Hi {firstname} {lastname},
-Your order with the reference {order_name} from {shop_name} has
+Your order with the reference {order_name} from {hotel_hotel_name} has
been canceled.
Here are your order details:
diff --git a/mails/en/order_changed.html b/mails/en/order_changed.html
index 3c9205457..513f5825b 100644
--- a/mails/en/order_changed.html
+++ b/mails/en/order_changed.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -87,7 +87,7 @@
Order {order_name} - Order changed
- Your order with the reference {order_name} from {shop_name} has been changed by the merchant.
+ Your order with the reference {order_name} from {hotel_hotel_name} has been changed by the merchant.
|
diff --git a/mails/en/order_changed.txt b/mails/en/order_changed.txt
index 68d77167f..63d689aa4 100644
--- a/mails/en/order_changed.txt
+++ b/mails/en/order_changed.txt
@@ -1,19 +1,19 @@
-[/{shop_url}]
+[/{shop_url}]
-Hi {firstname} {lastname},
+Hi {firstname} {lastname},
-Your order with the reference {order_name} from {shop_name} has
-been changed by the merchant.
+Your order with the reference {order_name} from {hotel_hotel_name} has
+been changed by the merchant.
You can review your order and download your invoice from the
"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our website.
+clicking "My account" [/{my_account_url}] on our website.
If you have a guest account, you can follow your order via the
"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section
-on our website.
+on our website.
{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
+[https://webkul.com]
diff --git a/mails/en/order_conf.html b/mails/en/order_conf.html
index c5990d109..a5d8bfafa 100755
--- a/mails/en/order_conf.html
+++ b/mails/en/order_conf.html
@@ -73,7 +73,7 @@
Hi {firstname} {lastname},
- Thank you for selecting our hotel!
+ Thank you for booking with {hotel_name}!
|
diff --git a/mails/en/order_conf.txt b/mails/en/order_conf.txt
index 2f6384972..7cbc6220f 100644
--- a/mails/en/order_conf.txt
+++ b/mails/en/order_conf.txt
@@ -1,6 +1,6 @@
Message from {shop_name}
Hi {firstname} {lastname},
-Thank you for selecting our hotel!
+Thank you for booking with {hotel_name}!
Order details
Order: {order_name} Placed on {date}
Room Image
diff --git a/mails/en/order_conf_admin.html b/mails/en/order_conf_admin.html
index c6e2a41a1..fb2340f07 100755
--- a/mails/en/order_conf_admin.html
+++ b/mails/en/order_conf_admin.html
@@ -72,7 +72,7 @@
Hi {firstname} {lastname},
- New Bookings created on {shop_name}!
+ New bookings are created on {hotel_name}!
|
diff --git a/mails/en/order_conf_admin.txt b/mails/en/order_conf_admin.txt
index 3ba3031df..3ee04fb3a 100644
--- a/mails/en/order_conf_admin.txt
+++ b/mails/en/order_conf_admin.txt
@@ -1,7 +1,7 @@
Message from {shop_name}
Hi {firstname} {lastname},
-New Bookings created on {shop_name}!
+New bookings are created on {hotel_name}!
Customer details
Name: {customer_name}
diff --git a/mails/en/overbooking.html b/mails/en/overbooking.html
index 95631ee77..9980442e1 100755
--- a/mails/en/overbooking.html
+++ b/mails/en/overbooking.html
@@ -73,7 +73,7 @@
Hi {firstname} {lastname},
- Thank you for selecting our hotel!
+ 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.
diff --git a/mails/en/overbooking.txt b/mails/en/overbooking.txt
index 6a8f8975a..bc18d9515 100644
--- a/mails/en/overbooking.txt
+++ b/mails/en/overbooking.txt
@@ -1,6 +1,6 @@
Message from {shop_name}
Hi {firstname} {lastname},
-Thank you for selecting our hotel!
+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.
diff --git a/mails/en/overbooking_admin.html b/mails/en/overbooking_admin.html
index 505142081..4804802dd 100755
--- a/mails/en/overbooking_admin.html
+++ b/mails/en/overbooking_admin.html
@@ -72,7 +72,7 @@
|
Hi {firstname} {lastname},
- New Bookings created on {shop_name}!
+ 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.
diff --git a/mails/en/overbooking_admin.txt b/mails/en/overbooking_admin.txt
index a9feed298..424afe838 100644
--- a/mails/en/overbooking_admin.txt
+++ b/mails/en/overbooking_admin.txt
@@ -1,7 +1,7 @@
Message from {shop_name}
Hi {firstname} {lastname},
-New Bookings created on {shop_name}!
+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.
diff --git a/mails/en/partial_payment_accepted.html b/mails/en/partial_payment_accepted.html
index 45940907a..83a30133e 100644
--- a/mails/en/partial_payment_accepted.html
+++ b/mails/en/partial_payment_accepted.html
@@ -71,7 +71,7 @@
|
Hi {firstname} {lastname},
- Thank you for booking with {shop_name}!
+ Thank you for booking with {hotel_hotel_name}!
|
diff --git a/mails/en/partial_payment_accepted.txt b/mails/en/partial_payment_accepted.txt
index 799594197..3c4720e06 100644
--- a/mails/en/partial_payment_accepted.txt
+++ b/mails/en/partial_payment_accepted.txt
@@ -3,7 +3,7 @@
Hi {firstname} {lastname},
-Thank you for booking with {shop_name}!
+Thank you for booking with {hotel_hotel_name}!
Order {order_name} - Payment processed
diff --git a/mails/en/payment_accepted.html b/mails/en/payment_accepted.html
index e0f738fcd..4db31e6b7 100644
--- a/mails/en/payment_accepted.html
+++ b/mails/en/payment_accepted.html
@@ -71,7 +71,7 @@
Hi {firstname} {lastname},
- Thank you for booking with {shop_name}!
+ Thank you for booking with {hotel_hotel_name}!
|
diff --git a/mails/en/payment_accepted.txt b/mails/en/payment_accepted.txt
index e77f02b86..99e2841a8 100644
--- a/mails/en/payment_accepted.txt
+++ b/mails/en/payment_accepted.txt
@@ -3,7 +3,7 @@
Hi {firstname} {lastname},
-Thank you for booking with {shop_name}!
+Thank you for booking with {hotel_hotel_name}!
Your payment for order with the reference {order_name} was
successfully processed.
diff --git a/modules/bankwire/bankwire.php b/modules/bankwire/bankwire.php
index 442a6b97a..91ed2d6f5 100644
--- a/modules/bankwire/bankwire.php
+++ b/modules/bankwire/bankwire.php
@@ -225,6 +225,10 @@ class Bankwire extends PaymentModule
$cartTotal = $objOrder->getOrdersTotalPaid();
}
+ // Get rooms bookings in the order
+ $objHotelBooking = new HotelBookingDetail();
+ $cartRoomBookings = $objHotelBooking->getBookingDataByOrderReference($objOrder->reference);
+ $smartyVars['cart_room_bookings'] = $cartRoomBookings;
$smartyVars['total_to_pay'] = Tools::displayPrice($cartTotal, $params['currencyObj'], false);
$smartyVars['bankwireDetails'] = Tools::nl2br($this->details);
$smartyVars['bankwireAddress'] = Tools::nl2br($this->address);
diff --git a/modules/bankwire/views/templates/hook/payment_return.tpl b/modules/bankwire/views/templates/hook/payment_return.tpl
index 1943a2471..7e0cd7579 100644
--- a/modules/bankwire/views/templates/hook/payment_return.tpl
+++ b/modules/bankwire/views/templates/hook/payment_return.tpl
@@ -24,7 +24,7 @@
*}
{if $status == 'ok'}
-{l s='Your order on %s is complete.' sprintf=$shop_name mod='bankwire'}
+ {l s='Your' mod='bankwire'} {if $cart_room_bookings|count > 1}{l s='bookings have' mod='bankwire'}{else}{l s='booking has' mod='bankwire'}{/if} {l s='been created successfully!' mod='bankwire'}
{l s='Please send us a bank wire with:' mod='bankwire'}
- {l s='Amount' mod='bankwire'} {$total_to_pay}
- {l s='Name of account owner:' mod='bankwire'} {if $bankwireOwner}{$bankwireOwner}{else}___________{/if}
diff --git a/modules/cheque/cheque.php b/modules/cheque/cheque.php
index 002f207e3..6547f6ec6 100644
--- a/modules/cheque/cheque.php
+++ b/modules/cheque/cheque.php
@@ -207,6 +207,10 @@ class Cheque extends PaymentModule
$cartTotal = $objOrder->getOrdersTotalPaid();
}
+ // Get rooms bookings in the order
+ $objHotelBooking = new HotelBookingDetail();
+ $cartRoomBookings = $objHotelBooking->getBookingDataByOrderReference($objOrder->reference);
+ $smartyVars['cart_room_bookings'] = $cartRoomBookings;
$smartyVars['total_to_pay'] = Tools::displayPrice($cartTotal, $params['currencyObj'], false);
$smartyVars['chequeName'] = $this->chequeName;
$smartyVars['chequeAddress'] = Tools::nl2br($this->address);
diff --git a/modules/cheque/views/templates/hook/payment_return.tpl b/modules/cheque/views/templates/hook/payment_return.tpl
index 66eea5216..3db46b58b 100644
--- a/modules/cheque/views/templates/hook/payment_return.tpl
+++ b/modules/cheque/views/templates/hook/payment_return.tpl
@@ -24,7 +24,7 @@
*}
{if $status == 'ok'}
- {l s='Your order on %s is complete.' sprintf=$shop_name mod='cheque'}
+ {l s='Your' mod='cheque'} {if $cart_room_bookings|count > 1}{l s='bookings have' mod='cheque'}{else}{l s='booking has' mod='cheque'}{/if} {l s='been created successfully!' mod='cheque'}
{l s='Your check must include:' mod='cheque'}
- {l s='Payment amount.' mod='cheque'} {$total_to_pay}
- {l s='Payable to the order of' mod='cheque'} {if $chequeName}{$chequeName}{else}___________{/if}
diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php
index d1c9e3e72..895fb9578 100644
--- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php
+++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php
@@ -1575,6 +1575,18 @@ class HotelBookingDetail extends ObjectModel
);
}
+ /**
+ * [getBookingDataByOrderReference :: To get all room bookings by order reference].
+ * @param [string] $orderReference [Reference of the order]
+ * @return [array] [If data found Returns the array containing the information of the booking of an order reference]
+ */
+ public function getBookingDataByOrderReference($orderReference)
+ {
+ return Db::getInstance()->executeS(
+ 'SELECT * FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `id_order` IN ( SELECT `id_order` FROM `'._DB_PREFIX_.'orders` WHERE `reference` = "'.pSQL($orderReference).'" )'
+ );
+ }
+
public static function getIdHotelByIdOrder($idOrder)
{
return Db::getInstance()->getValue(
diff --git a/themes/hotel-reservation-theme/guest-tracking.tpl b/themes/hotel-reservation-theme/guest-tracking.tpl
index c64b22524..197f1b8a9 100644
--- a/themes/hotel-reservation-theme/guest-tracking.tpl
+++ b/themes/hotel-reservation-theme/guest-tracking.tpl
@@ -131,6 +131,9 @@
{if isset($show_login_link) && $show_login_link}
{l s='Click here to log in to your customer account.'}
{/if}
+ {if isset($smarty.get.ord_conf) && $smarty.get.ord_conf}
+ {l s='Your'} {if $total_rooms_booked > 1}{l s='bookings have'}{else}{l s='booking has'}{/if} {l s='been created successfully!'}
+ {/if}
{block name='guest_tracking_form'}