[-] : Fix bug #PSCFV-4859, could not register invoice address or invoice country in OPC as guest, and phone not required in standard registration
This commit is contained in:
@@ -225,19 +225,19 @@ class AddressControllerCore extends FrontController
|
||||
else // Update cart address
|
||||
$this->context->cart->autosetProductAddress();
|
||||
|
||||
if ((bool)(Tools::getValue('select_address', false)) == true OR Tools::getValue('type') == 'invoice' && Configuration::get('PS_ORDER_PROCESS_TYPE'))
|
||||
{
|
||||
if ((bool)(Tools::getValue('select_address', false)) == true OR (Tools::getValue('type') == 'invoice' && Configuration::get('PS_ORDER_PROCESS_TYPE')))
|
||||
$this->context->cart->id_address_invoice = (int)$address->id;
|
||||
$this->context->cart->update();
|
||||
}
|
||||
|
||||
elseif (Configuration::get('PS_ORDER_PROCESS_TYPE'))
|
||||
$this->context->cart->id_address_invoice = (int)$this->context->cart->id_address_delivery;
|
||||
$this->context->cart->update();
|
||||
|
||||
if ($this->ajax)
|
||||
{
|
||||
$return = array(
|
||||
'hasError' => (bool)$this->errors,
|
||||
'errors' => $this->errors,
|
||||
'id_address_delivery' => $this->context->cart->id_address_delivery,
|
||||
'id_address_invoice' => $this->context->cart->id_address_invoice
|
||||
'id_address_delivery' => (int)$this->context->cart->id_address_delivery,
|
||||
'id_address_invoice' => (int)$this->context->cart->id_address_invoice
|
||||
);
|
||||
die(Tools::jsonEncode($return));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user