Merge pull request #881 from shreesh-webkul/gli-1078

Improvement: Address is not required in booking/order flow
This commit is contained in:
Rohit Jain
2024-03-17 14:37:16 +05:30
committed by GitHub
20 changed files with 114 additions and 213 deletions

View File

@@ -496,7 +496,7 @@ class OrderOpcControllerCore extends ParentOrderController
// 'allDemands' => $allDemands,
// 'defaultcurrencySign' => $objCurrency->sign,
'THEME_DIR' => _THEME_DIR_,
'PS_CUSTOMER_ADDRESS_CREATION' => Configuration::get('PS_CUSTOMER_ADDRESS_CREATION'),
'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
'PS_ROOM_PRICE_AUTO_ADD_BREAKDOWN' => Configuration::get('PS_ROOM_PRICE_AUTO_ADD_BREAKDOWN'),
'free_shipping' => $free_shipping,
'isGuest' => isset($this->context->cookie->is_guest) ? $this->context->cookie->is_guest : 0,
@@ -767,9 +767,6 @@ class OrderOpcControllerCore extends ParentOrderController
}
$address_delivery = new Address($this->context->cart->id_address_delivery);
$address_invoice = ($this->context->cart->id_address_delivery == $this->context->cart->id_address_invoice ? $address_delivery : new Address($this->context->cart->id_address_invoice));
if (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice || !Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) {
return '<p class="warning">'.Tools::displayError('Error: Please select an address.').'</p>';
}
if (count($this->context->cart->getDeliveryOptionList()) == 0 && !$this->context->cart->isVirtualCart()) {
if ($this->context->cart->isMultiAddressDelivery()) {
return '<p class="warning">'.Tools::displayError('Error: None of your chosen carriers deliver to some of the addresses you have selected.').'</p>';