Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

toplakd

Email Verification on registering

Recommended Posts

It happens to me that a lot of customers write wrong email when registering. They register with wrong email (ussualy small typo) and than order is placed. Than I get contacted through contact form (logged in with wrong email) why they don't receive updates on order. And one can't even reply to them. For those orders which are payed with paypal is not a problem, as paypal payment email delivers customer correct email address so I copy address from paypal's email and can contact them back.

So, I thought I could add confirmation email field, where customer enters his email for second time and therefore gives more attention to it in case of typo. Example is already available on changing passwords, so i made some trial/error and now its working for me on account registration Also disabled validation on second email field as 2 green's could fool one that both fields match,.

0_1528290818214_Screenshot from 2018-06-06 15-12-51.png

Added the lines which are between "email configuration start " and "email configuration end"

controllers/front/AuthController.php ``` // Checked the user address in case he changed his email address if (Validate::isEmail($email = Tools::convertEmailToIdn(Tools::getValue('email'))) && !empty($email)) { if (Customer::customerExists($email)) { $this->errors[] = Tools::displayError('An account using this email address has already been registered.', false);

/* email configuration start /
} elseif (Tools::getValue('email') != Tools::getValue('1confirmation')) { $this->errors[] = Tools::displayError('The email and confirmation do not match.'); /
email confirmation end */

} } // Preparing customer $customer = new Customer(); ```

/themes/your-theme-name/authentication.tpl ```

{* email confirmation start *}

{* email confirmation end *}

{l s='(Five characters minimum)'}
```

Share this post


Link to post
Share on other sites

Thanks for sharing! Let us know whether that reduces errors.

I personally dislike those confirmation ones. What I'd rather prefer is something like:

https://trumail.io / https://github.com/sdwolfe32/trumail https://hunter.io/email-verifier

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...