Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[-] FO : Fix #PSCFV-6209 required phone with Guest Checkout

  • Loading branch information...
commit d0eb31f3d61eedb54b588190ba7eb55aa9007798 1 parent 3e9e765
@gRoussac gRoussac authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 controllers/front/AuthController.php
View
14 controllers/front/AuthController.php
@@ -377,8 +377,18 @@ protected function processSubmitAccount()
$_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') || Configuration::get('PS_GUEST_CHECKOUT_ENABLED')))
+ $error_phone = false;
+ if (Configuration::get('PS_ONE_PHONE_AT_LEAST'))
+ {
+ if (Tools::isSubmit('submitGuestAccount') || !Tools::getValue('is_new_customer'))
+ {
+ if (!Tools::getValue('phone'))
+ $error_phone = true;
+ }
+ elseif (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || Configuration::get('PS_ORDER_PROCESS_TYPE') && (!Tools::getValue('phone') || !Tools::getValue('phone_mobile')))
+ $error_phone = true;
+ }
+ if ($error_phone)
$this->errors[] = Tools::displayError('You must register at least one phone number');
$this->errors = array_unique(array_merge($this->errors, $customer->validateController()));
Please sign in to comment.
Something went wrong with that request. Please try again.