Remove address as required in booking/order flow

This commit is contained in:
Shreesh Arora
2023-11-20 16:01:54 +05:30
parent ce93a9826f
commit 7b938aa023
8 changed files with 52 additions and 86 deletions

View File

@@ -735,9 +735,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>';