From f9e44fadfa20172dc48ea88ece4e055a6dc1d61e Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Fri, 28 Sep 2012 13:07:52 +0000 Subject: [PATCH] [-] FO : fixed bug #PSCFV-4347 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17607 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminCustomerPreferencesController.php | 2 +- controllers/front/AuthController.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminCustomerPreferencesController.php b/controllers/admin/AdminCustomerPreferencesController.php index 86963f02a..6475830af 100644 --- a/controllers/admin/AdminCustomerPreferencesController.php +++ b/controllers/admin/AdminCustomerPreferencesController.php @@ -61,7 +61,7 @@ class AdminCustomerPreferencesControllerCore extends AdminController ), 'PS_ONE_PHONE_AT_LEAST' => array( 'title' => $this->l('Phone number'), - 'desc' => $this->l('If you choose this option your customer will must register at least one phone number.'), + 'desc' => $this->l('If you chose yes, your customer will have to provide at least one phone number to register.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool' diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index 15f2be65d..191591969 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -390,8 +390,15 @@ class AuthControllerCore extends FrontController $customer = new Customer(); $_POST['lastname'] = Tools::getValue('customer_lastname'); $_POST['firstname'] = Tools::getValue('customer_firstname'); - if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone') && !Tools::getValue('phone_mobile') && Configuration::get('PS_REGISTRATION_PROCESS_TYPE')) + + if (Configuration::get('PS_ONE_PHONE_AT_LEAST') + && !Tools::getValue('phone') + && !Tools::getValue('phone_mobile') + && (Configuration::get('PS_ORDER_PROCESS_TYPE') //check if is in OPC mode + || (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !Configuration::get('PS_ORDER_PROCESS_TYPE')) //check if is simple registration mode and not in OPC mode) + ) $this->errors[] = Tools::displayError('You must register at least one phone number'); + $this->errors = array_unique(array_merge($this->errors, $customer->validateController())); // Check the requires fields which are settings in the BO