From a70beda4a8c51ffd709cbdb6bf8de16a0e5620fa Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Tue, 20 Dec 2022 10:27:34 +0530 Subject: [PATCH] add occupancy status in order --- classes/PaymentModule.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index 26b36cbbb..d961f79f7 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -354,9 +354,13 @@ abstract class PaymentModuleCore extends Module PrestaShopLogger::addLog('PaymentModule::validateOrder - Order is about to be added', 1, null, 'Cart', (int)$id_cart, true); } - // if (Configuration::get('PS_FRONT_SEARCH_TYPE') == HotelBookingDetail::SEARCH_TYPE_OWS) { - // $order->occupnacy_wise_booking = 1; - // } + if (isset($this->context->employee->id)) { + if (Configuration::get('PS_BACKOFFICE_OCCUPANCY_WISE_BOOKING')) + $order->occupnacy_wise_booking = 1; + } else { + if (Configuration::get('PS_FRONT_OCCUPANCY_WISE_BOOKING')) + $order->occupnacy_wise_booking = 1; + } // advance payment information $order->is_advance_payment = $this->context->cart->is_advance_payment;