Page 1 of 1
Customer Verification e-mail feature in OpenCart
Posted: Tue Mar 27, 2012 7:32 pm
by kafoso
Why not let customers approve their own accounts through a link in a customer account verification e-mail, used by many other webshop systems and Content Management Systems?
I put together a small tutorial explaning how to do this, which you can see here: **REMOVED BECAUSE URL DOES NOT EXIST ANYMORE**
(Sorry, but I'm not going to repost the entire thing here

)
The idea is that webshop administrators no longer have to approve all customers in a webshop, but at the same time maintain some level of safety, which is why a Captcha validation is used plus a one-time only link sent via e-mail to the customer. This ultimately means that customers can register and start shopping during the weekend, for instance, where webshop administrators may not have time to approve customers themselves.
I hope you will find this useful and hopefully the OpenCart team will consider integrating this in a newer version.
The modifications were performed in OpenCart version 1.5.1.3.1, but should work with all versions above 1.5.
Best regards
Kafoso
Re: Customer Verification e-mail feature in OpenCart
Posted: Thu May 24, 2012 12:34 am
by gabbya
YOU ARE A STAR.
Working perfect on ver 1.5.2.X
Thank you so much
Some extra:
Change :/catalog/model/account/customer.php
$message .= $this->url->link('account/login', '', 'SSL') . "\n\n";
to:
//$message .= $this->url->link('account/login', '', 'SSL') . "\n\n"; //we do not need the login link anymore.
Go to :/catalog/language/english/account/success.php
Replace :
$_['text_approval'] = '<p>Thank you for registering with %s!</p><p>You will be notified by email once your account has been activated by the store owner.</p><p>If you have ANY questions about the operation of this online shop, please <a href="%s">contact the store owner</a>.</p>';
With:
$_['text_approval'] = '<p>Thank you for registering with %s!</p><p>An email has been sent to the email address you provide us with a link to verify your Account.</p><p>Make sure to check your email and follow the link to activate your Account.</p><p>If you have ANY questions about the operation of this online shop, please <a href="%s">contact the store owner</a>.</p>';
Done..

Re: Customer Verification e-mail feature in OpenCart
Posted: Sun Jun 03, 2012 6:35 pm
by polewest
Thanks for that. However the Captcha validation does not work perfeclty as as long you have between 4 and 20 characters it will be accepted. So to correct it make sure you change the following:
Controller: /catalog/controller/account/register.php
REPLACE
if ((utf8_strlen($this->request->post['captcha']) < 4) || (utf8_strlen($this->request->post['captcha']) > 20)) {
$this->error['captcha'] = $this->language->get('error_captcha');
}
WITH
if ((utf8_strlen($this->request->post['captcha']) < 4) || (utf8_strlen($this->request->post['captcha']) > 20
|| ($this->session->data['captcha'] != $this->request->post['captcha']))) {
$this->error['captcha'] = $this->language->get('error_captcha');
}
Polewest
Re: Customer Verification e-mail feature in OpenCart
Posted: Sat Jul 21, 2012 1:42 pm
by forexengineer.us
Hello, any one test on v5.3.1?
im out of idea because the option for " APPROVE NEW CUSTOMERS" is missing =(
Anyone?

Re: Customer Verification e-mail feature in OpenCart
Posted: Sat Jul 21, 2012 10:45 pm
by Finezze
Hello, on OC 1.5.3.1 it is in:
sales > custumers > customers groups

Re: Customer Verification e-mail feature in OpenCart
Posted: Sat Jul 21, 2012 11:30 pm
by forexengineer.us
wah!
somebody care my question!
Thanks ya!

Re: Customer Verification e-mail feature in OpenCart
Posted: Sun Jul 22, 2012 12:40 am
by forexengineer.us
Hi all, i need help!
as i apply this script / method and all is ok,
but why the last method not sending the email? i mean the store return this message :
Your Account Has Been Created!
Thank you for registering with UNISEX || aLL in One pLace!
You will be notified by email once your account has been activated by the store owner.
If you have ANY questions about the operation of this online shop, please contact the store owner.
INSTEAD OF
Thanks blah blah, we have send the email varification and blah.
i check the mail box also the same, no varification link sent.
Why2? help2, any one expert please help me.
Here is my main URL : forexengineer.us
Thanks,

Re: Customer Verification e-mail feature in OpenCart
Posted: Sun Jul 22, 2012 1:09 am
by forexengineer.us
NOw it nearly solve!, but it seem not so better.
you try forexengineer.us and get registered. after some period, the store just pass this in browser without any design or any template that "nice"
Just a plain text and wrote this : Welcome and thank you for registering at UNISEX || aLL in One pLace! text_email_verification
http://www.forexengineer.us/index.php?r ... b3a5&u=290 Upon logging in, you will be able to access other services including reviewing past orders, printing invoices and editing your account information. Thanks, UNISEX || aLL in One pLace
so how to make it nice with template like it said successfully when there have no validation before?
Re: Customer Verification e-mail feature in OpenCart
Posted: Mon Jul 23, 2012 12:46 am
by Finezze
Hi.. we had a problem here. It works perfectly once the customer clicks in log in... He receives the validation email. He clicks, everything is fine, but if the customer adds a product to the cart and tries to checkout - without registering first - he completes the step one (name, address, etc) and when he clicks to continue the system doesn's take him to step 2.. instead says the register was done successfully ... so the customer has to leave the page, go to the email, click on the validation link and do the the whole shipping again... so they leave the shipping cart
tips for any solution?
thanks
Re: Customer Verification e-mail feature in OpenCart
Posted: Fri Aug 31, 2012 11:06 pm
by twicem
Hi, thank you very much for tutorial and for the files. But I have the same problem as forexengineer here. Everything works fine, just after filling in the registration form here is white html with text with generated validation link - which is only for confirmation e-mail

(instead of the success part of site). Any help? Thanks, Mike
Re: Customer Verification e-mail feature in OpenCart
Posted: Tue Oct 16, 2012 4:03 pm
by balveer
hello everyone...
i have a problem.when i am using facebook login after installing email verification module ...facebook user are also required email verification...and my client says their is no need of verification if user login using facebook...can anybody give me thr solution..how to bypass email verification when facebook users login..and other user which register with opencart have to verify...
my opencart version is 1.5.3.1..
and i am using facebookjsconnect extention for facebook login...please reply asap..its argent
Re: Customer Verification e-mail feature in OpenCart
Posted: Tue Mar 26, 2013 9:12 pm
by saulius
catalog/model/account/customer.php has line:
echo $message; die();
I think it would be better use redirect instead of echo there.
Re: Customer Verification e-mail feature in OpenCart
Posted: Wed Apr 10, 2013 4:56 am
by a18327
Excelente
Funciona en la versión 1.5.4.1
Solo que hay que hacer algunos cambios en los textos del archivo success.php de la carpeta language/english/account y hay dos textos ($_['text_account'] y $_['text_verification']) que faltan en el archivo de verification.php de la carpeta language/english/account y quitar el link de login en el correo que se envía, en el archivo customer.php de la carpeta model/account.
Re: Customer Verification e-mail feature in OpenCart
Posted: Mon Aug 19, 2013 6:25 pm
by webmarina
Re: Customer Verification e-mail feature in OpenCart
Posted: Tue Apr 22, 2014 3:06 pm
by misspiggy
I use the verification code.
Only thing I'm missing. When clicking on the activation link again you will get an error message.
I want it then to be redirected to the store (with maybe message that the link is already been activated).
Do you know how to do this?
Thanks!
Re: Customer Verification e-mail feature in OpenCart
Posted: Tue Apr 22, 2014 3:47 pm
by forexengineer.us
misspiggy wrote:I use the verification code.
Only thing I'm missing. When clicking on the activation link again you will get an error message.
I want it then to be redirected to the store (with maybe message that the link is already been activated).
Do you know how to do this?
Thanks!
You can pm me. I already pmed you

Contact me at
top@mynethoster.asia dont waste time to do that

Re: Customer Verification e-mail feature in OpenCart
Posted: Sat Aug 16, 2014 5:28 am
by directory92
How can I put Image in emails, when someone register email should send with an image, and when we manually approve customer email another image is also sent to user. I want to put some graphices in emails,
Any idea how to do this or how to do this with customer.php in language folder ?
Advanced Thanks !
Re: Customer Verification e-mail feature in OpenCart
Posted: Mon Apr 18, 2016 2:15 pm
by smarg
Hello, I'm trying to get this code work, without any luck. I use 1.5.6.4 but when I register it send me the message to activate the account, but it redirects to the home page. I think there is something wrong in the catalog/model/account/customer.php. I think it does not communicate with database. I appreciate your help!