[-] BO : Fix bug #PSCFV-7468 required phone in address creation
This commit is contained in:
@@ -126,7 +126,7 @@ class AdminAddressesControllerCore extends AdminController
|
||||
'name' => 'phone_mobile',
|
||||
'size' => 33,
|
||||
'required' => false,
|
||||
'desc' => sprintf($this->l('You must register at least one phone number %s'), '<sup>*</sup>')
|
||||
'desc' => Configuration::get('PS_ONE_PHONE_AT_LEAST')? sprintf($this->l('You must register at least one phone number %s'), '<sup>*</sup>') : ''
|
||||
),
|
||||
array(
|
||||
'type' => 'textarea',
|
||||
@@ -367,6 +367,9 @@ class AdminAddressesControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('Your Postal Code/Zip Code is incorrect.');
|
||||
}
|
||||
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone') && !Tools::getValue('phone_mobile'))
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number');
|
||||
|
||||
/* If this address come from order's edition and is the same as the other one (invoice or delivery one)
|
||||
** we delete its id_address to force the creation of a new one */
|
||||
if ((int)Tools::getValue('id_order'))
|
||||
|
||||
Reference in New Issue
Block a user