Update order is now split according to booking dates
This commit is contained in:
@@ -786,8 +786,9 @@ abstract class PaymentModuleCore extends Module
|
||||
foreach ($order->product_list as $product) {
|
||||
$objCartBookingData = new HotelCartBookingData();
|
||||
$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;
|
||||
@@ -941,8 +942,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,
|
||||
|
||||
Reference in New Issue
Block a user