Updated error message for guest account to customer account transformation

This commit is contained in:
vishalsingh.qlo325
2024-04-17 13:09:38 +05:30
parent 8dcfc9e892
commit 021a003ab3
2 changed files with 14 additions and 3 deletions

View File

@@ -176,7 +176,13 @@ class OrderOpcControllerCore extends ParentOrderController
if ($customer->transformToCustomer($this->context->language->id, $passwd)) {
$this->context->updateCustomer($customer);
} else {
$this->errors[] = Tools::displayError('An error occurred while transforming your account into a registered customer.');
if (!$customer->isGuest()) {
$this->errors[] = Tools::displayError('This account is already registered as a customer.');
}else if (!Validate::isPasswd($passwd)) {
$this->errors[] = Tools::displayError('Invalid password.');
} else {
$this->errors[] = Tools::displayError('An error occurred while transforming your account into a registered customer.');
}
}
}