Merge pull request #922 from shreesh-webkul/gli-1763

Improved: Orders are now split by hotel and booking duration
This commit is contained in:
Rohit Jain
2024-03-19 14:48:43 +05:30
committed by GitHub
5 changed files with 146 additions and 69 deletions

View File

@@ -772,8 +772,9 @@ abstract class PaymentModuleCore extends Module
$maxOverbookingCount = 0;
foreach ($order->product_list as $product) {
$idProduct = $product['id_product'];
$cartBookingData = $objCartBookingData->getOnlyCartBookingData($this->context->cart->id, $this->context->cart->id_guest, $idProduct);
if ($cartBookingData) {
if ($product['booking_product']
&& $cartBookingData = $objCartBookingData->getCartInfoIdCartIdProduct($this->context->cart->id, $idProduct, $product['date_from'], $product['date_to'])
) {
foreach ($cartBookingData as $bookingInfo) {
$objCartBookingData = new HotelCartBookingData($bookingInfo['id']);
$objCartBookingData->id_order = $order->id;
@@ -986,8 +987,8 @@ abstract class PaymentModuleCore extends Module
$product['id_product'],
isset($product['id_hotel']) ? $product['id_hotel'] : 0,
0,
0,
0,
$product['date_from'],
$product['date_to'],
0,
0,
null,