// Code cleaning
This commit is contained in:
1 parent
effdd3ebf0
commit
9b455a8f0e
1 file changed
+6
@@ -245,6 +245,11 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
if (!Tools::getValue('multi-shipping'))
|
if (!Tools::getValue('multi-shipping'))
|
||||||
$this->context->cart->setNoMultishipping();
|
$this->context->cart->setNoMultishipping();
|
||||||
|
|
||||||
|
if (!Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_delivery'))
|
||||||
|
|| (Tools::isSubmit('same') && !Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_invoice'))))
|
||||||
|
$this->errors[] = Tools::displayError('Invalid address');
|
||||||
|
else
|
||||||
|
{
|
||||||
// Add checking for all addresses
|
// Add checking for all addresses
|
||||||
$address_without_carriers = $this->context->cart->getDeliveryAddressesWithoutCarriers();
|
$address_without_carriers = $this->context->cart->getDeliveryAddressesWithoutCarriers();
|
||||||
if (count($address_without_carriers))
|
if (count($address_without_carriers))
|
||||||
@@ -269,6 +274,7 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
if (Tools::isSubmit('message'))
|
if (Tools::isSubmit('message'))
|
||||||
$this->_updateMessage(Tools::getValue('message'));
|
$this->_updateMessage(Tools::getValue('message'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->errors)
|
if ($this->errors)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user