toplakd Posted June 6, 2018 Posted June 6, 2018 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,. 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 ``` {l s='Email'} * {* email confirmation start *} {l s='Email Confirmation'} * {* email confirmation end *} {l s='Password'} * {l s='(Five characters minimum)'} ``` 1
30knees Posted June 6, 2018 Posted June 6, 2018 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now