Testing issues resolve and flow testing

This commit is contained in:
Sumit Panwar
2025-03-22 18:17:50 +05:30
parent 5265247e16
commit 9323f3b8ce
124 changed files with 4959 additions and 5681 deletions

View File

@@ -501,7 +501,7 @@ abstract class PaymentModuleCore extends Module
// Make sure CartRule caches are empty
CartRule::cleanCache();
$objRoomType = new HotelRoomType();
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
$objServiceProductCartDetail = new ServiceProductCartDetail();
$cart_rules = $this->context->cart->getCartRules();
foreach ($order_detail_list as $key => $order_detail) {
/** @var OrderDetail $order_detail */
@@ -608,7 +608,7 @@ abstract class PaymentModuleCore extends Module
$cover_img = $this->context->link->getImageLink($product['link_rewrite'], $this->context->language->iso_code."-default", 'small_default');
}
$product_var_tpl['cover_img'] = $cover_img;
$serviceProducts = $objRoomTypeServiceProductCartDetail->getCartStandardProducts(
$serviceProducts = $objServiceProductCartDetail->getServiceProductsInCart(
$order->id_cart,
[],
null,
@@ -961,11 +961,11 @@ abstract class PaymentModuleCore extends Module
}
if (!empty($normalProducts)) {
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
$objServiceProductCartDetail = new ServiceProductCartDetail();
foreach($normalProducts as $product) {
$idProduct = $product['id_product'];
if (Product::SELLING_PREFERENCE_WITH_ROOM_TYPE == $product['selling_preference_type']) {
if ($roomTypeServices = $objRoomTypeServiceProductCartDetail->getCartStandardProducts(
if ($roomTypeServices = $objServiceProductCartDetail->getServiceProductsInCart(
$this->context->cart->id,
[],
0,
@@ -982,24 +982,24 @@ abstract class PaymentModuleCore extends Module
$roomTypeService['date_to'],
$roomTypeService['id_room']
);
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
$objRoomTypeServiceProductOrderDetail->id_product = $idProduct;
$objRoomTypeServiceProductOrderDetail->id_order = $order->id;
$objRoomTypeServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objRoomTypeServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objRoomTypeServiceProductOrderDetail->id_htl_booking_detail = $roomBookingDetail['id'];
$objRoomTypeServiceProductOrderDetail->unit_price_tax_excl = $roomTypeService['unit_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->unit_price_tax_incl = $roomTypeService['unit_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_excl = $roomTypeService['total_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_incl = $roomTypeService['total_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->name = $product['name'];
$objRoomTypeServiceProductOrderDetail->quantity = $roomTypeService['quantity'];
$objRoomTypeServiceProductOrderDetail->auto_added = $product['auto_add_to_cart'];
$objRoomTypeServiceProductOrderDetail->save();
$objServiceProductOrderDetail = new ServiceProductOrderDetail();
$objServiceProductOrderDetail->id_product = $idProduct;
$objServiceProductOrderDetail->id_order = $order->id;
$objServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objServiceProductOrderDetail->id_htl_booking_detail = $roomBookingDetail['id'];
$objServiceProductOrderDetail->unit_price_tax_excl = $roomTypeService['unit_price_tax_excl'];
$objServiceProductOrderDetail->unit_price_tax_incl = $roomTypeService['unit_price_tax_incl'];
$objServiceProductOrderDetail->total_price_tax_excl = $roomTypeService['total_price_tax_excl'];
$objServiceProductOrderDetail->total_price_tax_incl = $roomTypeService['total_price_tax_incl'];
$objServiceProductOrderDetail->name = $product['name'];
$objServiceProductOrderDetail->quantity = $roomTypeService['quantity'];
$objServiceProductOrderDetail->auto_added = $product['auto_add_to_cart'];
$objServiceProductOrderDetail->save();
}
}
} elseif (Product::SELLING_PREFERENCE_HOTEL_STANDALONE == $product['selling_preference_type']) {
if ($hotelProducts = $objRoomTypeServiceProductCartDetail->getCartStandardProducts(
if ($hotelProducts = $objServiceProductCartDetail->getServiceProductsInCart(
$this->context->cart->id,
[],
null,
@@ -1009,26 +1009,26 @@ abstract class PaymentModuleCore extends Module
)) {
$idOrderDetail = $objBookingDetail->getPsOrderDetailIdByIdProduct($idProduct, $order->id, $product['selling_preference_type']);
foreach ($hotelProducts as $hotelProduct) {
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
$objRoomTypeServiceProductOrderDetail->id_product = $idProduct;
$objRoomTypeServiceProductOrderDetail->id_product_option = $hotelProduct['id_product_option'];
$objRoomTypeServiceProductOrderDetail->id_order = $order->id;
$objRoomTypeServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objRoomTypeServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objRoomTypeServiceProductOrderDetail->id_hotel = $product['id_hotel'];
$objRoomTypeServiceProductOrderDetail->unit_price_tax_excl = $hotelProduct['unit_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->unit_price_tax_incl = $hotelProduct['unit_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_excl = $hotelProduct['total_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_incl = $hotelProduct['total_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->name = $hotelProduct['name'];
$objRoomTypeServiceProductOrderDetail->option_name = $hotelProduct['option_name'];
$objRoomTypeServiceProductOrderDetail->quantity = $hotelProduct['quantity'];
$objRoomTypeServiceProductOrderDetail->save();
$objServiceProductOrderDetail = new ServiceProductOrderDetail();
$objServiceProductOrderDetail->id_product = $idProduct;
$objServiceProductOrderDetail->id_product_option = $hotelProduct['id_product_option'];
$objServiceProductOrderDetail->id_order = $order->id;
$objServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objServiceProductOrderDetail->id_hotel = $product['id_hotel'];
$objServiceProductOrderDetail->unit_price_tax_excl = $hotelProduct['unit_price_tax_excl'];
$objServiceProductOrderDetail->unit_price_tax_incl = $hotelProduct['unit_price_tax_incl'];
$objServiceProductOrderDetail->total_price_tax_excl = $hotelProduct['total_price_tax_excl'];
$objServiceProductOrderDetail->total_price_tax_incl = $hotelProduct['total_price_tax_incl'];
$objServiceProductOrderDetail->name = $hotelProduct['name'];
$objServiceProductOrderDetail->option_name = $hotelProduct['option_name'];
$objServiceProductOrderDetail->quantity = $hotelProduct['quantity'];
$objServiceProductOrderDetail->save();
}
}
} elseif (Product::SELLING_PREFERENCE_STANDALONE == $product['selling_preference_type']) {
if ($standaloneProducts = $objRoomTypeServiceProductCartDetail->getCartStandardProducts(
if ($standaloneProducts = $objServiceProductCartDetail->getServiceProductsInCart(
$this->context->cart->id,
[Product::SELLING_PREFERENCE_STANDALONE],
null,
@@ -1038,20 +1038,20 @@ abstract class PaymentModuleCore extends Module
)) {
$idOrderDetail = $objBookingDetail->getPsOrderDetailIdByIdProduct($idProduct, $order->id, $product['selling_preference_type']);
foreach ($standaloneProducts as $standaloneProduct) {
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
$objRoomTypeServiceProductOrderDetail->id_product = $idProduct;
$objRoomTypeServiceProductOrderDetail->id_product_option = $standaloneProduct['id_product_option'];
$objRoomTypeServiceProductOrderDetail->id_order = $order->id;
$objRoomTypeServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objRoomTypeServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objRoomTypeServiceProductOrderDetail->unit_price_tax_excl = $standaloneProduct['unit_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->unit_price_tax_incl = $standaloneProduct['unit_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_excl = $standaloneProduct['total_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_incl = $standaloneProduct['total_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->name = $standaloneProduct['name'];
$objRoomTypeServiceProductOrderDetail->option_name = $standaloneProduct['option_name'];
$objRoomTypeServiceProductOrderDetail->quantity = $standaloneProduct['quantity'];
$objRoomTypeServiceProductOrderDetail->save();
$objServiceProductOrderDetail = new ServiceProductOrderDetail();
$objServiceProductOrderDetail->id_product = $idProduct;
$objServiceProductOrderDetail->id_product_option = $standaloneProduct['id_product_option'];
$objServiceProductOrderDetail->id_order = $order->id;
$objServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objServiceProductOrderDetail->unit_price_tax_excl = $standaloneProduct['unit_price_tax_excl'];
$objServiceProductOrderDetail->unit_price_tax_incl = $standaloneProduct['unit_price_tax_incl'];
$objServiceProductOrderDetail->total_price_tax_excl = $standaloneProduct['total_price_tax_excl'];
$objServiceProductOrderDetail->total_price_tax_incl = $standaloneProduct['total_price_tax_incl'];
$objServiceProductOrderDetail->name = $standaloneProduct['name'];
$objServiceProductOrderDetail->option_name = $standaloneProduct['option_name'];
$objServiceProductOrderDetail->quantity = $standaloneProduct['quantity'];
$objServiceProductOrderDetail->save();
}
}
@@ -1063,7 +1063,7 @@ abstract class PaymentModuleCore extends Module
} elseif (isset($product['id_hotel']) && $product['id_hotel']) {
$idProductHotel = $product['id_hotel'];
}
if ($standardProducts = $objRoomTypeServiceProductCartDetail->getCartStandardProducts(
if ($serviceProducts = $objServiceProductCartDetail->getServiceProductsInCart(
$this->context->cart->id,
[],
$idProductHotel,
@@ -1071,39 +1071,39 @@ abstract class PaymentModuleCore extends Module
$idProductRoomType,
$product['id_product']
)) {
foreach ($standardProducts as $standardProduct) {
if ($standardProduct['id_hotel']) {
foreach ($serviceProducts as $serviceProduct) {
if ($serviceProduct['id_hotel']) {
$idOrderDetail = $objBookingDetail->getPsOrderDetailIdByIdProduct($idProduct, $order->id, Product::SELLING_PREFERENCE_HOTEL_STANDALONE);
} else {
$idOrderDetail = $objBookingDetail->getPsOrderDetailIdByIdProduct($idProduct, $order->id, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE);
}
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
$objRoomTypeServiceProductOrderDetail->id_product = $idProduct;
$objRoomTypeServiceProductOrderDetail->id_order = $order->id;
$objRoomTypeServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objRoomTypeServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objRoomTypeServiceProductOrderDetail->unit_price_tax_excl = $standardProduct['unit_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->unit_price_tax_incl = $standardProduct['unit_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_excl = $standardProduct['total_price_tax_excl'];
$objRoomTypeServiceProductOrderDetail->total_price_tax_incl = $standardProduct['total_price_tax_incl'];
$objRoomTypeServiceProductOrderDetail->name = $product['name'];
$objRoomTypeServiceProductOrderDetail->quantity = $standardProduct['quantity'];
if ($standardProduct['id_hotel']) {
$objRoomTypeServiceProductOrderDetail->id_product_option = $standardProduct['id_product_option'];
$objRoomTypeServiceProductOrderDetail->id_hotel = $standardProduct['id_hotel'];
$objRoomTypeServiceProductOrderDetail->option_name = $standardProduct['option_name'];
$objServiceProductOrderDetail = new ServiceProductOrderDetail();
$objServiceProductOrderDetail->id_product = $idProduct;
$objServiceProductOrderDetail->id_order = $order->id;
$objServiceProductOrderDetail->id_order_detail = $idOrderDetail;
$objServiceProductOrderDetail->id_cart = $this->context->cart->id;
$objServiceProductOrderDetail->unit_price_tax_excl = $serviceProduct['unit_price_tax_excl'];
$objServiceProductOrderDetail->unit_price_tax_incl = $serviceProduct['unit_price_tax_incl'];
$objServiceProductOrderDetail->total_price_tax_excl = $serviceProduct['total_price_tax_excl'];
$objServiceProductOrderDetail->total_price_tax_incl = $serviceProduct['total_price_tax_incl'];
$objServiceProductOrderDetail->name = $product['name'];
$objServiceProductOrderDetail->quantity = $serviceProduct['quantity'];
if ($serviceProduct['id_hotel']) {
$objServiceProductOrderDetail->id_product_option = $serviceProduct['id_product_option'];
$objServiceProductOrderDetail->id_hotel = $serviceProduct['id_hotel'];
$objServiceProductOrderDetail->option_name = $serviceProduct['option_name'];
} else {
$roomBookingDetail = $objBookingDetail->getRowByIdOrderIdProductInDateRange(
$order->id,
$standardProduct['id_room_type'],
$standardProduct['date_from'],
$standardProduct['date_to'],
$standardProduct['id_room']
$serviceProduct['id_room_type'],
$serviceProduct['date_from'],
$serviceProduct['date_to'],
$serviceProduct['id_room']
);
$objRoomTypeServiceProductOrderDetail->id_htl_booking_detail = $roomBookingDetail['id'];
$objRoomTypeServiceProductOrderDetail->auto_added = $product['auto_add_to_cart'];
$objServiceProductOrderDetail->id_htl_booking_detail = $roomBookingDetail['id'];
$objServiceProductOrderDetail->auto_added = $product['auto_add_to_cart'];
}
$objRoomTypeServiceProductOrderDetail->save();
$objServiceProductOrderDetail->save();
}
}
}
@@ -1210,10 +1210,12 @@ abstract class PaymentModuleCore extends Module
$cart_booking_data_html = $this->getEmailTemplateContent('hotel-booking-cart-data.tpl', Mail::TYPE_HTML, $cart_booking_data['cart_htl_data']);
$extra_demands_details_html = $this->getEmailTemplateContent('booking_extra_demands.tpl', Mail::TYPE_HTML, $cart_booking_data['cart_htl_data']);
$extra_demands_details_text = $this->getEmailTemplateContent('booking_extra_demands_text.tpl', Mail::TYPE_HTML, $cart_booking_data['cart_htl_data']);
$normal_products_data_html = $this->getEmailTemplateContent('service-product-data.tpl', Mail::TYPE_TEXT, $orderServiceProducts);
$extra_demands_details_text = $this->getEmailTemplateContent('booking_extra_demands_text.tpl', Mail::TYPE_TEXT, $cart_booking_data['cart_htl_data']);
$normal_products_data_html = $this->getEmailTemplateContent('service-product-data.tpl', Mail::TYPE_HTML, $orderServiceProducts);
$normal_products_data_txt = $this->getEmailTemplateContent('service-product-data-text.tpl', Mail::TYPE_TEXT, $orderServiceProducts);
// get order total information html/txt files
// total room price
$room_price_tax_excl = $order->getTotalProductsWithoutTaxes(false, true) + $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM);
$room_price_tax_incl = $order->getTotalProductsWithTaxes(false, true) + $order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM);
@@ -1230,21 +1232,63 @@ abstract class PaymentModuleCore extends Module
$total_convenience_fee_tax = $total_convenience_fee_ti - $total_convenience_fee_te;
// service products
// $service_products_price_tax_excl = $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE);
// $service_products_price_tax_incl = $order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE);
// $service_products_tax = ($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE) - $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE));
$total_order_tax = $room_tax + $additional_service_tax + $total_convenience_fee_tax;
$standalone_products_price_tax_excl = $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE);
$standalone_products_price_tax_incl = $order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE);
$hotel_standalone_products_price_tax_excl = $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE);
$hotel_standalone_products_price_tax_incl = $order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE);
$idOrderHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id);
$objHotelBranchInfo = new HotelBranchInformation($idOrderHotel, $order->id_lang);
$service_products_tax = ($standalone_products_price_tax_incl + $hotel_standalone_products_price_tax_incl) - ($standalone_products_price_tax_excl + $hotel_standalone_products_price_tax_excl);
$total_order_tax = $room_tax + $additional_service_tax + $total_convenience_fee_tax + $service_products_tax;
$total_products = Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $order->total_products : $order->total_products_wt, $this->context->currency, false);
$orderTotalData = array(
'room_price_tax_excl' => Tools::displayPrice($room_price_tax_excl, $this->context->currency, false),
'room_price_tax_incl' => Tools::displayPrice($room_price_tax_incl, $this->context->currency, false),
'room_tax' => Tools::displayPrice($room_tax, $this->context->currency, false),
'additional_service_price_tax_excl' => Tools::displayPrice($additional_service_price_tax_excl, $this->context->currency, false),
'additional_service_price_tax_incl' => Tools::displayPrice($additional_service_price_tax_incl, $this->context->currency, false),
'additional_service_tax' => Tools::displayPrice($additional_service_tax, $this->context->currency, false),
'total_convenience_fee_ti' => Tools::displayPrice($total_convenience_fee_ti, $this->context->currency, false),
'total_convenience_fee_te' => Tools::displayPrice($total_convenience_fee_te, $this->context->currency, false),
'total_convenience_fee_tax' => Tools::displayPrice($total_convenience_fee_tax, $this->context->currency, false),
'service_products_price_tax_excl' => Tools::displayPrice(
($standalone_products_price_tax_excl + $hotel_standalone_products_price_tax_excl),
$this->context->currency,
false
),
'service_products_price_tax_incl' => Tools::displayPrice(
($standalone_products_price_tax_incl + $hotel_standalone_products_price_tax_incl),
$this->context->currency,
false
),
'service_products_tax' => Tools::displayPrice($service_products_tax, $this->context->currency, false),
'total_order_tax' => Tools::displayPrice($total_order_tax, $this->context->currency, false),
'total_paid' => Tools::displayPrice($order->total_paid, $this->context->currency, false),
'total_products' => Tools::displayPrice($total_products, $this->context->currency, false),
'total_discounts' => Tools::displayPrice(-$order->total_discounts, $this->context->currency, false),
'has_standalone_products' => $orderServiceProducts,
'has_room_bookings' => $cart_booking_data['cart_htl_data']
);
$order_total_info_html = $this->getEmailTemplateContent('order-conf-total-info.tpl', Mail::TYPE_HTML, $orderTotalData);
$order_total_info_txt = $this->getEmailTemplateContent('order-conf-total-info-text.tpl', Mail::TYPE_TEXT, $orderTotalData);
$hotelName = '';
if ($idOrderHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id)) {
$objHotelBranchInfo = new HotelBranchInformation($idOrderHotel, $order->id_lang);
$hotelName = $objHotelBranchInfo->hotel_name;
}
$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,
'{extra_demands_details_text}' => $extra_demands_details_text,
'{normal_products_data_html}' => $normal_products_data_html,
'{normal_products_data_txt}' => $normal_products_data_txt,
'{order_total_info_html}' => $order_total_info_html,
'{order_total_info_txt}' => $order_total_info_txt,
'{total_extra_demands_te}' => Tools::displayPrice(
$cart_booking_data['total_extra_demands_te'],
$this->context->currency,
@@ -1286,8 +1330,8 @@ abstract class PaymentModuleCore extends Module
'{products_txt}' => $product_list_txt,
'{discounts}' => $cart_rules_list_html,
'{discounts_txt}' => $cart_rules_list_txt,
'{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false),
'{total_products}' => Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $order->total_products : $order->total_products_wt, $this->context->currency, false),
'{total_paid}' => Tools::displayPrice($total_paid, $this->context->currency, false),
'{total_products}' => Tools::displayPrice($total_products, $this->context->currency, false),
'{total_discounts}' => Tools::displayPrice(-$order->total_discounts, $this->context->currency, false),
'{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false),
'{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false),
@@ -1335,6 +1379,10 @@ abstract class PaymentModuleCore extends Module
$overBookingStates = OrderState::getOverBookingStates();
$isOverBookingStatus = in_array($id_order_state, $overBookingStates);
if (Configuration::get('PS_ORDER_CONF_MAIL_TO_CUSTOMER')){
// order_header_line tpl for using on different emails as per conditions for hotel or not hotel orders
$headerLineParams = array('hotel_name' => $hotelName, 'has_room_bookings' => $cart_booking_data['cart_htl_data']);
$data['{order_header_line_html}'] = trim(Mail::getEmailTemplateContent('order_header_line', Mail::TYPE_HTML, $headerLineParams));
$data['{order_header_line_txt}'] = trim(Mail::getEmailTemplateContent('order_header_line_text', Mail::TYPE_TEXT, $headerLineParams));
// If order currenct state is overbooking, the send overbooking email or send order confirmation email
if ($isOverBookingStatus) {
$subject = Mail::l('Order Not Confirmed', (int)$order->id_lang);
@@ -1386,6 +1434,10 @@ abstract class PaymentModuleCore extends Module
}
}
}
$headerLineParams = array('for_admin' => true, 'hotel_name' => $hotelName, 'has_room_bookings' => $cart_booking_data['cart_htl_data']);
$data['{order_header_line_html}'] = trim(Mail::getEmailTemplateContent('order_header_line', Mail::TYPE_HTML, $headerLineParams));
$data['{order_header_line_txt}'] = trim(Mail::getEmailTemplateContent('order_header_line_text', Mail::TYPE_TEXT, $headerLineParams));
if (Configuration::get('PS_ORDER_CONF_MAIL_TO_SUPERADMIN')){
// get superadmin employees
if ($superAdminEmployees = Employee::getEmployeesByProfile(_PS_ADMIN_PROFILE_, true)) {
@@ -1812,7 +1864,7 @@ abstract class PaymentModuleCore extends Module
$obj_htl_bk_dtl = new HotelBookingDetail();
$obj_rm_type = new HotelRoomType();
$objBookingDemand = new HotelBookingDemands();
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
$objServiceProductOrderDetail = new ServiceProductOrderDetail();
$result['total_extra_demands_te'] = 0;
$result['total_extra_demands_ti'] = 0;
$cart_htl_data = array();
@@ -1909,15 +1961,19 @@ abstract class PaymentModuleCore extends Module
1
);
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services'] = $objServiceProductOrderDetail->getRoomTypeServiceProducts(
$order->id,
0,
0,
$type_value['product_id'],
$data_v['date_from'],
$data_v['date_to']
$data_v['date_to'],
0,
0,
null,
0,
);
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_ti'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_ti'] = $objServiceProductOrderDetail->getRoomTypeServiceProducts(
$order->id,
0,
0,
@@ -1930,7 +1986,7 @@ abstract class PaymentModuleCore extends Module
1,
Product::PRICE_ADDITION_TYPE_WITH_ROOM
);
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_te'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_te'] = $objServiceProductOrderDetail->getRoomTypeServiceProducts(
$order->id,
0,
0,