You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->errors[] = Tools::displayError('You are already registered as a guest with this email address.').' <button type="submit" class="btn btn-link alert-link btn-transform" name="submitTransformAccount">'.Tools::displayError('Click here').'</button>'.Tools::displayError('').' to generate a password for your account.';
394
394
}
395
395
}
@@ -591,8 +591,16 @@ protected function processSubmitAccount()
591
591
}
592
592
593
593
if (!count($this->errors)) {
594
-
if (Customer::customerExists(Tools::getValue('email'))) {
595
-
$this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
594
+
if (!Tools::getValue('is_new_customer', 1)) {
595
+
if ($idCustomer = Customer::customerExists(Tools::getValue('email'), true, false)) {
596
+
if ($idAddress = Customer::getCustomerIdAddress($idCustomer)) {
597
+
$address = newAddress($idAddress);
598
+
}
599
+
}
600
+
} else {
601
+
if (Customer::customerExists(Tools::getValue('email'))) {
602
+
$this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false);
603
+
}
596
604
}
597
605
598
606
$this->processCustomerNewsletter($customer);
@@ -606,11 +614,17 @@ protected function processSubmitAccount()
0 commit comments