Post by kafoso » Tue Mar 27, 2012 7:32 pm

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

Newbie

Posts

Joined
Wed Aug 31, 2011 3:58 am

Post by gabbya » Thu May 24, 2012 12:34 am

YOU ARE A STAR. :banana:
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..
:)

User avatar
New member

Posts

Joined
Sun May 06, 2012 11:39 pm

Post by polewest » Sun Jun 03, 2012 6:35 pm

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

Newbie

Posts

Joined
Mon May 21, 2012 1:48 pm

Post by forexengineer.us » Sat Jul 21, 2012 1:42 pm

Hello, any one test on v5.3.1?
im out of idea because the option for " APPROVE NEW CUSTOMERS" is missing =(
Anyone? ??? ??? ???

New member

Posts

Joined
Sat Jul 21, 2012 1:40 pm

Post by Finezze » Sat Jul 21, 2012 10:45 pm

Hello, on OC 1.5.3.1 it is in:

sales > custumers > customers groups

;)

Newbie

Posts

Joined
Mon Jul 16, 2012 11:18 am

Post by forexengineer.us » Sat Jul 21, 2012 11:30 pm

wah!
somebody care my question! :)

Thanks ya! ;D

New member

Posts

Joined
Sat Jul 21, 2012 1:40 pm

Post by forexengineer.us » Sun Jul 22, 2012 12:40 am

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, :-\

New member

Posts

Joined
Sat Jul 21, 2012 1:40 pm

Post by forexengineer.us » Sun Jul 22, 2012 1:09 am

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?

New member

Posts

Joined
Sat Jul 21, 2012 1:40 pm

Post by Finezze » Mon Jul 23, 2012 12:46 am

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

Newbie

Posts

Joined
Mon Jul 16, 2012 11:18 am

Post by twicem » Fri Aug 31, 2012 11:06 pm

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

Newbie

Posts

Joined
Fri Aug 31, 2012 10:57 pm

Post by balveer » Tue Oct 16, 2012 4:03 pm

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

Newbie

Posts

Joined
Tue Oct 16, 2012 3:55 pm

Post by saulius » Tue Mar 26, 2013 9:12 pm

catalog/model/account/customer.php has line:
echo $message; die();
I think it would be better use redirect instead of echo there.

Newbie

Posts

Joined
Tue Mar 26, 2013 9:11 pm

Post by a18327 » Wed Apr 10, 2013 4:56 am

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.

Newbie

Posts

Joined
Fri Feb 01, 2013 4:55 am

Post by webmarina » Mon Aug 19, 2013 6:25 pm


Newbie

Posts

Joined
Sat Aug 10, 2013 11:31 pm

Post by misspiggy » Tue Apr 22, 2014 3:06 pm

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!

Newbie

Posts

Joined
Fri Nov 18, 2011 7:37 pm

Post by forexengineer.us » Tue Apr 22, 2014 3:47 pm

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 :)

New member

Posts

Joined
Sat Jul 21, 2012 1:40 pm

Post by directory92 » Sat Aug 16, 2014 5:28 am

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 !

Newbie

Posts

Joined
Sat May 12, 2012 6:59 pm

Post by smarg » Mon Apr 18, 2016 2:15 pm

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!

Newbie

Posts

Joined
Wed Apr 13, 2016 2:08 pm
Who is online

Users browsing this forum: No registered users and 19 guests