Jump to content
PhpMadman

[FREE MODULE] Validate Customer

Recommended Posts

Hi.

This is my first attempt on a module.
It's a basic module, that informs the customer that a admin must approve his account before he can login.

When user register account, the module automatically logout customer, and then set the status to disabled.
After that you have to manually enabled customer and the if mail template exist in your language, an mail will be sent automatically.

 

Version 1.1
* Added support for translations
* Added redirect to validate page.
* Fixed text typo
* Added some text to validate page.

Version 1.2
* Changed redirect address
* Added mail notify code from Anila Niaz's customerupdatenotification modulehttps://github.com/anila-niaz/Prestashop/tree/master/Modules/customerupdatenotification
* Diabled notify code, it's not working

Version 1.3
* 1.6 upgrade
* Competly remove code for auto mail
* Improved the code for how account is deactivated
* Wrote new and improved mail code
* Added php switch for mail
* Mail should be sent in customer language
* Added a db table to see what customers has been validated by module

Version 1.4
* Remove Please call line from template
* Fixed? redirect issue. Tested on 1.6.0.9
* Added switch to enable auto sending e-mail when an account activates
* Added switch for enableing employee e-mail when customer register

validatecustomer.zip

 

Edited by PhpMadman

Share this post


Link to post
Share on other sites

That seems very strange.

All the module does is to set newly reggd customers to disabled.

All old customers should not be affected.

Edited by PhpMadman

Share this post


Link to post
Share on other sites

Thank you for creating this module! I think is great, but when a customer creates an account, in the backoffice you can't see it (at the top in the left, like facebook), you must go to customers and see it.

 

And when you create the account, it redirects directly to the autentification page. Could you do it to redirect to another page that only shows "Your account is not activated yet, we're checking your account. If you want an instant answer call us to.... or send us an email to..." or something like that.

Share this post


Link to post
Share on other sites

Hi.

 

It shows customer in the little msg panel in backoffice for me.

 

As for the redirect. I don't know how to to that yet. I only been working on PS for 2 months. And I need to get the company's webshop launched soon. But I will look in to it, when I have the time. But it may take a while..

Share this post


Link to post
Share on other sites

And when you create the account, it redirects directly to the autentification page. Could you do it to redirect to another page that only shows "Your account is not activated yet, we're checking your account. If you want an instant answer call us to.... or send us an email to..." or something like that.

 

Hello.

 

I'm been working on this. And managed to add a redirect.

However if feels a little empty.

Any thoughts on what text to display? Currently I have this.

 

{l s='Thank you for registering.' mod='validatecustomer'}<br>
{l s='Your account must be approved by an admin before you can login after registering' mod='validatecustomer'}

 

Oh, and also... It can now be translated. Swedish language will be included in next release.

Share this post


Link to post
Share on other sites

Hello.

 

I'm been working on this. And managed to add a redirect.

However if feels a little empty.

Any thoughts on what text to display? Currently I have this.

 

{l s='Thank you for registering.' mod='validatecustomer'}<br>
{l s='Your account must be approved by an admin before you can login after registering' mod='validatecustomer'}

 

I guess that it's ok, you only need to say few words. Also you could type something like "Your account must be approved by an admin before you can login after registering. If you want an instant answer, please call to : shopnumber"

Share this post


Link to post
Share on other sites

Thank you PhpMadman!!! I really appreciate it!

but i have an issue, the problem is when someone creates an account, in the backoffice appears this:

258rl7t.jpg

 

I want only actived the second one and the third one, and not actived the first one.

 

Also where can i translate the text "Thank you for registering.

Your account must be approved by an admin before you can login after registering.

If you want an instant answer, please call :"????

 

thank you.

 

PD: do you know how to create a little popup window that says "you need to login to see the prices" or something like that?

Edited by centrobolsos

Share this post


Link to post
Share on other sites

If I understand you correct, if you click to acivte newsleltter and 3rd party offer, the account get's activated?

 

As for the translation. in the module folder, check the translation folder. There is a swedish translation. copy that, change it to your countrycode and then change the swedish string. Do not mess with the scrambeled validatecustomer]>844sdfs string

 

As for the popup window. Not at the moment.

Share this post


Link to post
Share on other sites

If I understand you correct, if you click to acivte newsleltter and 3rd party offer, the account get's activated?

 

As for the translation. in the module folder, check the translation folder. There is a swedish translation. copy that, change it to your countrycode and then change the swedish string. Do not mess with the scrambeled validatecustomer]>844sdfs string

 

As for the popup window. Not at the moment.

 

Haha, no. Sorry, i'm not very clear explaining.

In the picture, the second and the third option when it's activated, in my back office if a customer is new, on the top appears a number, like in facebook. I mean, i register as a customer, and wait for the admin answer, but the admin didn't know if i'm new or not, because there's no "popup" or "new notification" like facebook, i know that it's not very usefull, but sometimes it is.

 

Thank you for your effort.

Share this post


Link to post
Share on other sites

Oh. Okey, then I understand. I don't know what could be causing that. Because all my module really do is when customer reg, it log them out from their account, and then disable it. It dosen't really do anything in the backoffice.

 

I'll do som test tonight if I got the time, but it seem like a very strange ting for my module to cause.

Share this post


Link to post
Share on other sites

Hi.

 

This is my first attempt on a module.

It's a basic module, that informs the customer that a admin must approve his account before he can login.

 

When user register account, the module automatically logout customer, and then set the status to disabled.

After that you have to manually enabled customer and manually email customer that his account has been enabled.

 

I have to develop my works webshop, so I don't have time to update / maintain the module so much, so anyone can feel free to update it as they see fit.

 

*UPDATE*

 

New release, Changelog

 

Version 1.1

* Added support for translations

* Added redirect to validate page.

* Fixed text typo

* Added some text to validate page.

 

Some notes.

I used the {debug} smarty to find a smarty called {$telnumber}, and that for me atlest, get's our nr to the store. However, it does not seems to be the number entred in the Store Contacts, beacuse I added a ! and it did not show.

 

The tpl file customers are redirected to is called validate, and can be foumd in views/templates/front

Edit as see fit, to see your changes, navigate to index.php?fc=module&module=validatecustomer&controller=validate

 

 

 

Hi,

 

Its really great to see your module. I hope to develop one in future.

 

I wonder If admin fails to validate it in time and the customer goes to other site as he cant shop in my site? Just thinking about this possibility.

 

Or is it same like a customer gets verification email instantly and thus he can verify his account and start shopping?

 

Please correct me if i misunderstood the functionality.

 

Thank you.

 

Thank you.

Share this post


Link to post
Share on other sites

Hi.

 

You got most of it right.

I will simplify it.

 

1. This modules does nothing automatic.

2. User reg, user get reg mail, user goes my validate msg page.

3. An admin has to manually activate user in BackOffice, and then manually send a mail to the customer, about the user been activated.

 

So that the user is get annoyed and goes to another site is a possibility.

 

But not an issue for my site, since it aimed at local companies.

Share this post


Link to post
Share on other sites

Hi.

 

You got most of it right.

I will simplify it.

 

1. This modules does nothing automatic.

2. User reg, user get reg mail, user goes my validate msg page.

3. An admin has to manually activate user in BackOffice, and then manually send a mail to the customer, about the user been activated.

 

So that the user is get annoyed and goes to another site is a possibility.

 

But not an issue for my site, since it aimed at local companies.

 

Hi,

 

Thanks for clarifying it. :)

 

What is the main objective of providing such privileges to admin at the cost of user convenience as this generation is getting impatient over wait times.

 

Sometimes, I am afraid even having need to register gets away customers.

 

I am trying to improve my site's UX quotient. :) and will install your module.

 

Thank you.

Edited by PrestaFanBoy

Share this post


Link to post
Share on other sites

Well, sine our site is for country local companies. We use it to make sure they are registred as a company that pays a speical company tax called F-Skatt, and also to check that they are credit friendly.

 

As for thoose who use it on sites with regular users I don't know...

Share this post


Link to post
Share on other sites

Error installing in Ps 1.4.9.0.. Cant be installed..

 

Tks..

This is tested on 1.5.3.1 should work on 1.5.x.

 

I looked one some modules, for 1.4, but there is to much code diffrence for it to work.

Share this post


Link to post
Share on other sites

Hi , i m new in php and prestashop.

I have created my first web store and i like your module , i think its great.

 

But i have a problem , whem i create the account send me an error page like this

 

Fatal error: Call to a member function fetch_assoc() on a non-object in /home/jonymacd/public_html/shop/classes/db/DbMySQLi.php on line 79

 

Can u helpme whit this ?

 

 

my web store is www.labolonia.com.ar

 

Thank a lot...

Jon

Share this post


Link to post
Share on other sites

go to prestashop addons and look for customer email verification

Hi,

 

You forget the link in this post.

 

dopn't forget to put your spam on all topics in all language because in French topic i don't see your spam yet.

Share this post


Link to post
Share on other sites

Hi

I'm using you module, this one, to keep  certain customer at bay until theyr data are verified to fully qualify  ( basically I want  genuine reseller only, with VAT etc etc, no private people/customer )
lately I've got a problem, already twice in a week , people has registered AND enabled themself.

how can this be possible? how has it happened ?

Thanks for your help in investigating this

Share this post


Link to post
Share on other sites

Hi

 

I'm using you module, this one, to keep  certain customer at bay until theyr data are verified to fully qualify  ( basically I want  genuine reseller only, with VAT etc etc, no private people/customer )

lately I've got a problem, already twice in a week , people has registered AND enabled themself.

 

how can this be possible? how has it happened ?

 

Thanks for your help in investigating this

Hi,

here with Update

 

1 We think problem has been sort Out

2 Problem apparently Depends on Presta shop Mobile Setting AND PAypal ( API sides possibly )

 

long story Short:

Got a presta 1.5.6.1 Shop ( upgraded since one year ago )

where Customers have to be manually checked and approved, this because it's a B2B and we want ro deal with genuine Business people , Only. Prices also are Hidden to visitor.

 

So after setting  the ordinary to do not allow people to register and enables Themselve, we setted you Mod  for extra protection on our prospects dedicated price list, Also we  setted shop (default)  on Smartphone only , in Mobile behaviour  area.

 

 

 We found  2 different people coming Inside the shop ( meaning: having access to prices -hidden-) without   enabling them,

and 1 of them did and paied an Order Via Paypal (!!)

 

After extensive research we found the Following :

In Some situations, browsing from Some Android Smartphone Browsers and Versions , If you are already logged on Paypal account ( your Own...)  you Open a new Tab in your Browser to visit  a Prestashop setted as  above reported, You Might Bypass the 'filters' and Buy yourselve some items, also all the price will be Visible to You.

 

What we did:

 

We took the Radio  Button OFF in  -Mobile - Smartphone  only, and setted on  OFF the mobile things.

 

The, after even without cookyes cleaning was no possible to access site anymore, nor to 'enter' it in any way If you were NOT a legitimated ( registered and Approved ) Customer.

 

Maybe reason are even differents, I' d a small and succinte report of my/our case. 

 

Kind regards 

Share this post


Link to post
Share on other sites

Thanks for this really useful module! I was looking for something like this for a project of mine.

In the open-source spirit of 'giving back to the community' I made some adjustments to your module to improve the functionality:

 

First the question you had in your start post: Where you can get the phone number. I believe it's configured in the module 'blockcontact' and is thus retrieveable by the following code:

Configuration::get('blockcontact_telnumber')

Then I added a little method to your class to enable the sending of an e-mail to the shop owner that a new registration is pending:

 

In the function hookActionCustomerAccountAdd() right before Tools::redirect() add the following method-call:

$this->sendNotificationMail()

At the end of the class add this method:

/**
 * Send an e-mail to the shop owner
 *
 * @return boolean
 */
protected function sendNotificationMail()
{
    $customer = $this->context->customer;
    $shopContactMail = Configuration::get('PS_SHOP_EMAIL');

    return Mail::Send(
        $this->context->language->id,
        'notifyowner',
        Mail::l('New Registration!'),
            array(
                '{company}'   => $customer->company,
                '{firstname}' => $customer->firstname,
                '{lastname}'  => $customer->lastname,
                '{email}'     => $customer->email
            ),
            $shopContactMail
        );
}

Lastly don't forget to add the e-mail template(s) called 'notifyowner' to the your_curent_theme/mails/en/ folder (or whatever language you use). The example mail I use is:

File: default/mails/en/notifyowner.txt

A new has been created for {shop_name}.

The submitted customer details are:

Company: {company}
First name: {firstname}
Last name: {lastname}
E-mail: {email}

Please login to the admin page to activate this account.
Edited by C-Laze

Share this post


Link to post
Share on other sites

Looking for verification, does this work with 1.6.0.5 ?

 

I uploaded it but it did not show up in the list.

 

I tried a manual install as well. Am I missing something?

 

Thank you for your time.

 

 

EDIT: Second time is a charm, looks uploaded. I will test it now.

    

very usefull mod ..thanks.

Edited by Names

Share this post


Link to post
Share on other sites

Looking for verification, does this work with 1.6.0.5 ?

 

I uploaded it but it did not show up in the list.

 

I tried a manual install as well. Am I missing something?

 

Thank you for your time.

 

 

EDIT: Second time is a charm, looks uploaded. I will test it now.

    

very usefull mod ..thanks.

Ok So I get a blank Screen after I register same as a previous poster.

anyone know the issue here?

Yes it creates the account, and sends out the email.

But initially it does not redirect the page......

Share this post


Link to post
Share on other sites

Hi

 

Thanks for your module, it's really useful. :-)

 

Right now when the admin validates the account he/she still needs to send manually an email to the user to confirm his/her registration. Is there a way to get this done automatically?

 

Many thanks for your time on this.

 

Guillaume

Share this post


Link to post
Share on other sites

 

Thanks for this really useful module! I was looking for something like this for a project of mine.

In the open-source spirit of 'giving back to the community' I made some adjustments to your module to improve the functionality:

 

First the question you had in your start post: Where you can get the phone number. I believe it's configured in the module 'blockcontact' and is thus retrieveable by the following code:

Configuration::get('blockcontact_telnumber')

Then I added a little method to your class to enable the sending of an e-mail to the shop owner that a new registration is pending:

 

In the function hookActionCustomerAccountAdd() right before Tools::redirect() add the following method-call:

$this->sendNotificationMail()

At the end of the class add this method:

/**
 * Send an e-mail to the shop owner
 *
 * @return boolean
 */
protected function sendNotificationMail()
{
    $customer = $this->context->customer;
    $shopContactMail = Configuration::get('PS_SHOP_EMAIL');

    return Mail::Send(
        $this->context->language->id,
        'notifyowner',
        Mail::l('New Registration!'),
            array(
                '{company}'   => $customer->company,
                '{firstname}' => $customer->firstname,
                '{lastname}'  => $customer->lastname,
                '{email}'     => $customer->email
            ),
            $shopContactMail
        );
}

Lastly don't forget to add the e-mail template(s) called 'notifyowner' to the your_curent_theme/mails/en/ folder (or whatever language you use). The example mail I use is:

File: default/mails/en/notifyowner.txt

A new has been created for {shop_name}.

The submitted customer details are:

Company: {company}
First name: {firstname}
Last name: {lastname}
E-mail: {email}

Please login to the admin page to activate this account.
First of all say thanks to you for this and to all community, I'm new here.
I installed this module and works perfectly for me, but now I'm trying to add that code and nothing happens, no errors no mails receiving and don't know why, can you help me?
 

I'm running prestashop 1.6.0.6

 

Thank you.

Share this post


Link to post
Share on other sites

tks som much for the module.

 

 

I just did install on 1.6.0.6 and I'll let you now know about tests ;)

Edited by leovano

Share this post


Link to post
Share on other sites

New version released!
 

Version 1.1
* Added support for translations
* Added redirect to validate page.
* Fixed text typo
* Added som text to validate page.

Version 1.2
* Changed redirect address
* Added mail notify code from Anila Niaz's customerupdatenotification module
https://github.com/anila-niaz/Prestashop/tree/master/Modules/customerupdatenotification
* Diabled notify code, it's not working

Version 1.3
* 1.6 upgrade
* Competly remove code for auto mail
* Improved the code for how account is deactivated
* Wrote new and improved mail code
* Added php switch for mail
* Mail should be sent in customer language
* Added a db table to see what customers has been validated by module

This new version has mostly code improvements, but also I added the function to send an mail when account is activated.
 
I read the thread, and see that some wanted a mail when a customer reg themself.
I did not add that, beacuse that function allready exist in prestashop own E-Mail alets module.
 
If you don't want to send mail, open the php file and set send_mail to false.
 
The mail included is based on prestashop 1.6.0.9.
If you are on 1.5.x, you need to make your own to match your theme. I suggest to copy prestashops own account.html/txt

validatecustomer.zip

Edited by PhpMadman

Share this post


Link to post
Share on other sites

Hello, I come from version 1.1 and all right, in version 1.3 does not me back to the registration page appears, nor any email.

Edited by Rubenmo

Share this post


Link to post
Share on other sites

Great plugin, but PhpMadman, it's not true PS Mail Alert sends out emails on registration. It does that on orders only. So if someone registers, but doesn't order, no notification is send.

Share this post


Link to post
Share on other sites

Hello, sorry for late response. It seems I lost the notification for this thread. I'll address the issues later tonight.

@Rubenmo What PrestaShop version do you have? And can you enable debug mode, to see if you get any error?

Share this post


Link to post
Share on other sites

Thnxs a lot for the effort. Nice and clean work.

We use it without a problem in b2b.balloon.gr, prestashop 1.6.0.5

Activation mail works great and translations are quite easy.

Share this post


Link to post
Share on other sites

I'm working on a e-mail for when a customer reg.

Should be done later this week.

How can I make that module work on Prestashop 1.2.5? I would be appreciated if you could simply clarify.

Share this post


Link to post
Share on other sites

Bonjour , Merci pour ce partage qui fonctionne très bien sur la version 1.6.0.9 !

-----------------------------------------------------------------------------------------------

Hello, Thanks for sharing that works fine on version 1.6.0.9 !

Edited by G.Solidarité

Share this post


Link to post
Share on other sites

Hi madman,  (FYI)

 

I had report that my Authorized Only module was not sending the admin email of new registration.  So I went and took a look and 'I think' because your module does redirect that any other modules hooked at hookActionCustomerAccountAdd will not trigger.  

 

 

also with debug mode on: I noticed this 'post' registration, not saying anything wrong with your fine work, just passing this on.  thanks for contributing...Fred

Your account must be approved by an admin before you can login after registering.
If you want an instant answer, please call : Notice: Undefined index: telnumber in /var/www/vhosts/somedomain.com/clientes/cache/smarty/compile/a3/11/46/a311461d6c7c91d4ea2d31fd45d3d3e06c3f2757.file.validate.tpl.php on line 31 Notice: Trying to get property of non-object in /var/www/vhosts/somedomain.com/clientes/cache/smarty/compile/a3/11/46/a311461d6c7c91d4ea2d31fd45d3d3e06c3f2757.file.validate.tpl.php on line 31

Share this post


Link to post
Share on other sites

Hi PHPMadnam!
It's the first message I write (I will soon open a topic for other questions). Do you think it's possible to make a change and send an email to the customer with an activation email, instead that the admin should activate the account? Or is it to much work?

Thanks in advance

Share this post


Link to post
Share on other sites

Hi PhpMadman

 

First of all many thanks for this module:)! It help me a lot:)

Can u look on module working version 1.3 on prestashop 1.5.6.2?? I'm asking because  I get some errors on that version to be specific:

 

1)After Registration I get redirect on 404 error page instead of information page.

 

2) I get no e-mails to admin nor client after registration/activation.

 

Thanks in advance:)

Share this post


Link to post
Share on other sites

 

Hi madman,  (FYI)

 

I had report that my Authorized Only module was not sending the admin email of new registration.  So I went and took a look and 'I think' because your module does redirect that any other modules hooked at hookActionCustomerAccountAdd will not trigger.  

 

 

also with debug mode on: I noticed this 'post' registration, not saying anything wrong with your fine work, just passing this on.  thanks for contributing...Fred

Your account must be approved by an admin before you can login after registering.
If you want an instant answer, please call : Notice: Undefined index: telnumber in /var/www/vhosts/somedomain.com/clientes/cache/smarty/compile/a3/11/46/a311461d6c7c91d4ea2d31fd45d3d3e06c3f2757.file.validate.tpl.php on line 31 Notice: Trying to get property of non-object in /var/www/vhosts/somedomain.com/clientes/cache/smarty/compile/a3/11/46/a311461d6c7c91d4ea2d31fd45d3d3e06c3f2757.file.validate.tpl.php on line 31

 

Hi thanks for the Info. I made a new version today, that should hoppefully fix these issues.

 

 

Hi PHPMadnam!

It's the first message I write (I will soon open a topic for other questions). Do you think it's possible to make a change and send an email to the customer with an activation email, instead that the admin should activate the account? Or is it to much work?

 

Thanks in advance

 

It would be possibole, but it's not what this module is for. You are looking for a module another type of module. Googling Prestashop Activation by email should give you something what you are looking for.

 

Hi PhpMadman

 

First of all many thanks for this module:)! It help me a lot:)

 

Can u look on module working version 1.3 on prestashop 1.5.6.2?? I'm asking because  I get some errors on that version to be specific:

 

1)After Registration I get redirect on 404 error page instead of information page.

 

2) I get no e-mails to admin nor client after registration/activation.

 

Thanks in advance:)

 

Hi.

 

Try the new 1.4 version and see if you still have the same problem.

 

And also. Since I got problem getting notice from this thread.

Report issues here: https://github.com/PhpMadman/PrestaShop-MadModules/issues

 

As for answers here. I usally answer within 2-3 workdays. If I have not answered in that time. Send me a PM informing me about this thread.

 

validatecustomer.zip

Version 1.4
* Remove Please call line from template
* Fixed? redirect issue. Tested on 1.6.0.9
* Added switch to enable auto sending e-mail when an account activates
* Added switch for enableing employee e-mail when customer register

Share this post


Link to post
Share on other sites

This is exactly the module I need, but unfortunately it's not working. I'm on PrestaShop 1.6.0.9 and using latest version (1.4) of this plugin. On customer registration no email is sent to the admin, only the default PrestaShop email to the registered user. Also, when the account is activated by the admin, no email is sent to the customer.

 

I have disabled the default PrestaShop option to send email after registration, bit it's still the same: this module does not send any email.

Share this post


Link to post
Share on other sites

Ooooooopppppsssss, big oversight on my part. Had done translations in the back-end, but forgot to add the right translations in the 'mail' folder. Now it's working. A big sorry that I may have caused PhpMadman scraping his head what might be wrong.

Share this post


Link to post
Share on other sites

Well i got a nice problem here.. I installed this mod on 1.5.6.2 to help curb some of the bots. After about 2 weeks I uninstalled it. Well the mod is gone but all the settings are still there. Meaning even without the mod, I still have to validate a new user.

 

Even tried to get around it on my test site by just copying the database and transferring it... Didnt work.

 

 

so, what files does this mode attache to? and what does the database have to do with it??

Share this post


Link to post
Share on other sites

Well i got a nice problem here.. I installed this mod on 1.5.6.2 to help curb some of the bots. After about 2 weeks I uninstalled it. Well the mod is gone but all the settings are still there. Meaning even without the mod, I still have to validate a new user.

 

Even tried to get around it on my test site by just copying the database and transferring it... Didnt work.

 

 

so, what files does this mode attache to? and what does the database have to do with it??

 

Hi.

 

I does not add any special files. All files are keept in modules folder. And it uses default PrestaShop hooks.

It has it own table in database, but that don't affect prestashop, it just to keep track of the validated customer.

 

I got no clue why you still need to validate customers.

Share this post


Link to post
Share on other sites

Hello

 

First I want to thank you for this module, is exactly what I was looking for.

Only one little issue, I have the left sidebar of my web disable in all of the module pages, but when the "validate customer" module take me to the screen with the message "the account need to be activated" when a new user registred, it put me a left sidebar.

 

Do you know any way of disable this left sidebar?

 

I'm in the last version of prestashop and this module

Share this post


Link to post
Share on other sites

Hi,

 

First of all, thank you for this great module ! I have an issue though : when in back-office I activate the "Send new registration mail" option, it displays this error after a subscription : Error : The parameter "to" is corrupted.

Share this post


Link to post
Share on other sites

I've just found the solution! The answer to the issue was because I didn't enter the admin's email address in the BO. <_<

Now, I have one more question : Is it possible to add customer's information like vat number and siret number in the mail sent to admin ?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

This is a very interesting module, thanks for sharing :-)

 

Sam, of course it is possible, in the section where the email is sent there is an array with data for the mail template:

array('{email}' => $customer->email,'{shopname}' => $this->context->shop->name),

Just add fields that you want, like:

'{siret}' => $customer->siret

And then use it in the e-mail template.

 

(I don't see VAT number field in the Customer class, but maybe it has some other name...)

 

I have one more question regarding the module - is it really necessary to have that additional table in the database? Wouldn't it be just fine to send the email to the customer when his account is activated in the back office?

Share this post


Link to post
Share on other sites

Thank you so much Daresh for your reply. The example you gave with the siret number works perfectly. :) As for the VAT number, it's in the Address class. So I tried something like :

'{vat_number}' => $address->vat_number

but it doesn't work. :/

 

Also, I would like to know if someone has been able to mention the shop's phone number in the "validate.tpl" file. I tried this coding but it doesn't work :

{l s='Your account must be approved by an admin before you can login after registering. If you want an instant answer, please call us on: ' mod='validatecustomer'} Configuration::get('blockcontact_telnumber').

 

Thank you for your help.

Share this post


Link to post
Share on other sites

So that would not be so straightforward as with the Siret. The customer can have many addresses, there is a getAddresses() method in the Customer class, you would need to use it and then go looking for the VAT number.

 

As for the telephone I would rather modify the validate controller to get that configuration value, and then pass it through smarty to the template file.

Share this post


Link to post
Share on other sites

Thanks a lot Daresh. Well, as I'm worthless in programming, I don't know exactly what to do with the getAddresses() method. In fact, my client would like to receive an e-mail containing the customer's VAT number so that he doesn't need to connect to the Back-office and look for this info.

 

Concerning the phone number, is it ok if I write this in the controller file ?

$telnumber = Configuration::get('blockcontact_telnumber');

Or do I need to include it in a function ?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

I would try something like:

$this->context->smarty->assign('telnumber', Configuration::get('blockcontact_telnumber'));

in the initContent() function, and then use {telnumber} in template file.

 

Should work (I didn't test it though).

Share this post


Link to post
Share on other sites

Hello,

 

Strange that we can't display the customer password in the account activation email...

In the "validatecustomer.php" file, in the Mail array, I added :

'{passwd}' => $customer->passwd

 

It didn't work. So I tried :

 

'{passwd}' => Tools::getValue('passwd')

 

Didn't work either. :(

 

Any idea someone please ?

 

Thank you.

Share this post


Link to post
Share on other sites

Hi Daresh :) ,

 

How are you ?

Once again, you are here to answer my questions. Thank you so much !

 

If I'm not mistaken, with this module installed, the client doesn't receive the "account.html" file in which we remind him his address email and password. Instead, just after he registers, he receives a message in which we inform him that his registration has to be approved before validation. Then, if his registration is validated, he receives an email ("account_activated.html" file) informing him that his account has been validated. But in this email, isn't it possible to remind him the password he entered when he signed in ?

Share this post


Link to post
Share on other sites

Hi,

(Sorry my english)

I installed last version. i can't see activation link in mail.

 

 

 

Hi fatih u
Thank you for creating a customer account at Telefon Kapaklar.

 

 

Your Telefon Kapaklar login details

Here are your login details:
E-mail address: fatih.ucan@.......
Password: 465564645

 

 

 

Important Security Tips:

  1. Always keep your account details safe.
  2. Never disclose your login details to anyone.
  3. Change your password regularly.
  4. Should you suspect someone is using your account illegally, please notify us immediately.

 

 

You can now place orders on our shop: Telefon Kapaklar

Share this post


Link to post
Share on other sites

Sorry for late replies, I stil don't get any notifies from this thread. I'll contact PS team to get it fixed...

In the meantime, I'll try to keep an better eye on this thread.

 

@ciberkino

 

To make sure left / right sidebar is disable add this before the initContent function

 

    public function init()
    {
        $this->display_column_left = false;
        $this->display_column_right = false;
        parent::init();
    }

@Daresh
    The reason for the DB is so that email is only is sent on first activation. If you disable customer and then enable again, no actvation mail will be sent.

 

@fatihucan29

This module does not provide a activation e-mail. It allows YOU to enable the CUSTOMER from BO.

 

@Sam Minerve

The account.html should still be sent.

Share this post


Link to post
Share on other sites

If I create a customer account from back office and I activate the customer, it is not send a email.

 

Is it only work when a customer register herself/himself?

 

Thanks.

Share this post


Link to post
Share on other sites

This is exactly the module I need, but unfortunately it's not working. I'm on PrestaShop 1.6.0.9 and using latest version (1.4) of this plugin. On customer registration no email is sent to the admin, only the default PrestaShop email to the registered user. Also, when the account is activated by the admin, no email is sent to the customer.

 

I have disabled the default PrestaShop option to send email after registration, bit it's still the same: this module does not send any email.

 

Hello,

 

I have the same problem. I am using Prestashop 1.6.1.0 and the last version of this module (1.4). No email is sent to admin or client   (also no email when the account is activated).

 

Any tip?

 

Thanks!! :)

Share this post


Link to post
Share on other sites

hi! redirect 404 after registration (/index.php?controller=?fc=module&module=validatecustomer&controller=validate). not send e-mails for new customers. prestashop 1.6.0.14, Validate Customer 1.4

Edited by arest

Share this post


Link to post
Share on other sites

Is it possible to disable module for quick shopping?

 

I mean if someone want to create an account it will be disabled till I actived him throug BO. But if someone want to make quick shopping creating an account through OPC it cannot be enabled in BO?

 

Thnx in advance

Share this post


Link to post
Share on other sites

Ooooooopppppsssss, big oversight on my part. Had done translations in the back-end, but forgot to add the right translations in the 'mail' folder. Now it's working. A big sorry that I may have caused PhpMadman scraping his head what might be wrong.

 

I've just found the solution! The answer to the issue was because I didn't enter the admin's email address in the BO. <_<

Now, I have one more question : Is it possible to add customer's information like vat number and siret number in the mail sent to admin ?

 

Thanks in advance.

 

 HI! Both! I get no emails to admin after registration, How did you do? 

Share this post


Link to post
Share on other sites

The mail notification worked on my ps 1.6.0.9.

After upgrade to 1.6.1.3, I stopped receiving mails after user registration.

 

In my opinion, this module is NOT COMPATIBLE with lastest version of Prestashop.

Share this post


Link to post
Share on other sites
Hi,

 

everything works perfectly with the module and thank you.

It would be great to add is that if access to the account is denied, the customer will also get an email of refusal.

Share this post


Link to post
Share on other sites

Hi,

 

I'm using the module for ps 1.6.1.3. It works perfectly, except in some devices. There are some smartphone don't resolve the register and the syistem redirect them to home, without do the register.
In my 'error_log' file shows the next message in theese cases: "Handler for (null) returned invalid result code 70014" Anybody with similar error? Any ideas?

 

Thank you.

Share this post


Link to post
Share on other sites
Hello! first of all congratulate you on the module, it's great!

 

Me a problem has occurred in prestashop 1.6. I installed the module and I worked perfectly, only had a problem when sending the e-mail that your account is already active in the matter put the name of the store that had at first and did not know how to change it. I reinitialize the module, I tried inactivated it and will not yield results until I tried to remove it. Now do not let me install the module !!! the charge in the back office and upload it, I get the menu with the option to install but will not let me ...

 

Any solution?

I am Spanish and do not speak English ... I hope I read well.

Cheers

post-1195604-0-98076300-1457281814_thumb.png

Share this post


Link to post
Share on other sites

 

Hello! first of all congratulate you on the module, it's great!
 
Me a problem has occurred in prestashop 1.6. I installed the module and I worked perfectly, only had a problem when sending the e-mail that your account is already active in the matter put the name of the store that had at first and did not know how to change it. I reinitialize the module, I tried inactivated it and will not yield results until I tried to remove it. Now do not let me install the module !!! the charge in the back office and upload it, I get the menu with the option to install but will not let me ...
 
Any solution?
I am Spanish and do not speak English ... I hope I read well.
Cheers

 

You just need to create in the module's mail directory your language directory.

 

In your case: validatecustomer/mails/es/ (Spanish)

Share this post


Link to post
Share on other sites

Hi PhpMadman,

First, thank you for this great plugin. I have been using it for more than two years and it's been working very well for me.

Still, I would like to ask a question:

Right now, when a customer tries to login (after registration) and his/her account is not enabled yet, the login page does not do anything, it just returns to the login page again and again. So the customer is confused and does not know why they can't login. Of course I have set the plugin to send an explanatory email, but most customers would try to login right after registration and get frustrated.

Is it  possible to display some message at customer login, when his/her account has not been validated (yet/at all)?

Thanks.

Share this post


Link to post
Share on other sites