Jump to content

[Free Module] Account activation by eMail


Recommended Posts

Hi all,

Found this free module while surfing the net, thought it may be useful to some other users.

It allows customers to verify their account via a link sent by email, useful to stop people registering with fake email accounts.

One thing you may need to change, the first time I uploaded the mod (activationbymail_2010_04_14.zip ) it was not showing under my modules tab, I renamed the zip file to activationbymail.zip and reuploaded, works fine on 1.4.7 smile.png

Jay

activationbymail.zip

 

Added by mdekker - DO NOT REMOVE

This module has several issues:

- Cannot be uploaded through Back Office. Requires you to find the right directory and upload this through FTP.

- Not compatible with PrestaShop 1.5 or 1.6

These warnings can be removed as soon as the issues have been resolved.

Edited by mdekker
Warning (see edit history)
  • Like 5

Share this post


Link to post
Share on other sites

Hi pubguv,

Per the rules of the PrestaShop forums, all modules and threads posted in the Free section must include the files directly within the thread, and not lead to an external site. I will check back this afternoon to ensure you have made the necessary changes, and will otherwise have to move this thread to the Paid section.

 

-Mike

Share this post


Link to post
Share on other sites

This module works for 1.4.7.3 and thanks :)

 

Note

 

If anyone wants to change this sentence :-

 

'Your registration requires final activation prior to being fully available. This is so that we can verify your email address. We have sent you an email with an unique activation link for your registration. You will need to click on this link to have your account activated. Once activated, you will be able to login to our shop.'

 

You can find it under info.tpl

  • Like 1

Share this post


Link to post
Share on other sites

Hello, it works well.

Only one thing, when you click on the link and go back in the shop, you'll be warned if everything went well.

need to enter a confirmation message.

excuse my bad English.

Share this post


Link to post
Share on other sites

Hello, it works well.

Only one thing, when you click on the link and go back in the shop, you'll be warned if everything went well.

need to enter a confirmation message.

excuse my bad English.

 

You can change all those chunk of words under info.tpl

Share this post


Link to post
Share on other sites
  • 2 months later...
  • 2 months later...
  • 3 weeks later...

hello, thank you for this module. I uploaded it to my Prestashop back office (uploaded the file activationbymail.zip ).

My backoffice prestashop says upload was successful... but I can not find the module.

Under which module is it in the prestashop back office ?

 

I have the same problem... Anyone please help!!!

Share this post


Link to post
Share on other sites
  • 4 weeks later...
  • 2 weeks later...

Su PS1.5.3 l'installazione viene effettuata, ma alla fine della registrazione dell'account viene visualizzata la pagina 404 e non invia nessuna mail (oltre a quelle normali).

 

Qualcuno sa se ci sono operazioni da fare? Il modulo non ha nessuna configurazione?!?!

Share this post


Link to post
Share on other sites
  • 1 month later...

Installed and test on 1.5.3.1 localhost. Not working, the validation link didn't do anything and opens up to..

 

 

Not Found

 

The requested URL /prestashop/index.phpmodules/activationbymail/activation.php was not found on this server.

 

Anyone have any idea how to fix this? the link problem.

 

 

Another problem is right after registration. It shows.

 

PAGE NOT AVAILABLE

We're sorry, but the Web address you entered is no longer available

 

instead of redirect to the information in the info.tpl of

 

Your registration requires final activation prior to being fully available. This is so that we can verify your email address. We have sent you an email with an unique activation link for your registration. You will need to click on this link to have your account activated. Once activated, you will be able to login to our shop.'

Any thoughts?

Edited by mainoknok (see edit history)

Share this post


Link to post
Share on other sites

Made a change to the link and now it's working on 1.5.3.1

Only problem is, there's no message after account registration saying there will be a validation link send to the registered email"

and another problem is there's no resend validation link.

 

Anyone have any clue on how to set this?

Share this post


Link to post
Share on other sites
  • 3 weeks later...

Made a change to the link and now it's working on 1.5.3.1

Only problem is, there's no message after account registration saying there will be a validation link send to the registered email"

and another problem is there's no resend validation link.

 

Anyone have any clue on how to set this?

 

Hello everyone,

 

Did anyone solve these issues? The module works with 1.5.3.1 which is great, but it would be nice to have full funcionalty to make it nicer. :)

 

Jambo

Share this post


Link to post
Share on other sites

I had some bugs too... the activation link isn't working every time...

 

So I choosed to uninstall it and work without this module...

 

Anyway, I receive an email when an account is created so I don't really need this.

Share this post


Link to post
Share on other sites
  • 2 weeks later...

The problem with my 2 sites ( one PS old version and one new ) is that when the customer creates an account the shopping carts are emptied as soon as they complete the registration.

Even after they click the activation link, the cart is always empty and they have to start finding all the products again.

 

the "Cart re-display at login" in the BO is enabled. I don't have this problem if the module is disabled.

 

Is anyone else having this problem?

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi, I just tried it on 1.5 .4.1 and its not working there. When you complete the registration, it takes you to the home page and does nothing. Your data is inserted into database but you can neither sign in nor you get any verification email. Developer kindly fix this if you can.

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...

Works perfectly on 1.5.4.1

 

Only below change should be done to use.

 

in file "activationbymail.php" line 73 the '&link=' should be replaced by '?link='

 

Those who are getting 404 error .

 

Thanks

  • Like 4

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Great Module

But as another user already mentioned, is there a possibility to keep the shopping carts content so the customer does not have to collect all the products again?

Greetings Nihi

Share this post


Link to post
Share on other sites
  • 4 weeks later...

Hi, I have installed this on 1.5.5 and it doesn't work. It creates the new user but it doesn't send an activation link in the mail.

The mail it sends only says that the user has been created and shows the login credentials.

Can anyone help? Thanks

Share this post


Link to post
Share on other sites

Yup, I have exactly the same issue. Cart re-display at login option is configured correctly in Prefs>Customers and works as expected with this module disabled. However, the cart is not persisted if you register an account on-the-fly on your way to checkout. Immediately after the activation notification, the cart is lost and even after activation (which works ok) the cart is still lost and in my opinion this is a deal breaker as it's likely to put customers off having to re-add all their products again.

 

Bug report here: https://code.google.com/p/activationbymail/issues/list

 

Almost spot on, if you can fix this cart issue.
Cheers

 

The problem with my 2 sites ( one PS old version and one new ) is that when the customer creates an account the shopping carts are emptied as soon as they complete the registration.
Even after they click the activation link, the cart is always empty and they have to start finding all the products again.

the "Cart re-display at login" in the BO is enabled. I don't have this problem if the module is disabled.

Is anyone else having this problem?

Share this post


Link to post
Share on other sites
  • 3 weeks later...

Thank you to the developer, nice module and used it in previous versions of prestashop

 

But I am having issues with Prestashop 1.5.6 in that once I create a account it´s sending a "Mail Failure -malformed recipient address" (mail not sent error) but when I click the activation link in this e-mail it does works as the "activated the account" message does comes up on the webpage.

 

I don´t understand as it´s sending the prestashop e-mails OK to the same e-mail address, it´s just the ones from the module That I am getting the problem with, here is the first few lines from the e-mail

 

A message that you sent contained one or more recipient addresses that were incorrectly constructed:

 

*******@puntomatica.com <******@puntomatica.com>: malformed address: <******@puntomatica.com> may not follow *******@puntomatica.com

 

This address has been ignored. There were no other addresses in your message, and so no attempt at delivery was possible.

 

Can anyone help please ???

Share this post


Link to post
Share on other sites
  • 1 month later...

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

 

If "Friendly URL's" option is activated, your modification is ok, but if that option is not active, you must use '&link='. So, I modified the file 'activationbymail.php' like this:

 

in file "activationbymail.php"
Replace line 73 with below given code.

 

"$read = "SELECT value FROM ps_configuration WHERE name = 'PS_REWRITING_SETTINGS'";
$connect = @mysqli_connect(_DB_SERVER_, _DB_USER_, _DB_PASSWD_, _DB_NAME_);
if ($connect) {
$res1 = mysqli_query($connect, $read);
while ($row1 = mysqli_fetch_assoc($res1)){
         $config = $row1;
     }
} else {
echo('Cannot connect to database...'); exit;
}
mysqli_close($connect);
    
if ($config['value'] == '0'){
$link = $this->context->link->getModuleLink($this->name, 'activation') . '&link=' . $activation_link;
} else {
$link = $this->context->link->getModuleLink($this->name, 'activation') . '?link=' . $activation_link;
} "

I check if "Friendly URL's" option is activated or not to compose the activation link.

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

 

I found this code in a website, did the above said replacements, 

 

The code works good, thanks a lot, but another problem i am getting is:

I tested as a unregistered customer, added few items in cart, and then in check out,
i registered as a new customer then got verification mail, Backend Customer status is also Enabled, after clicking verification mail. Everything is perfect until this.

Problem:
Following email verification URL the landing page is: "Your Account is Activated". Not the (step 2, customer address). So here what i am coming to tell is the purchase continuity is missing, ordered items in cart is missing as well as not logged in.

How to fix this please help.
My Prestashop Version is 1.5.4.1

Thank you

Share this post


Link to post
Share on other sites
  • 4 weeks later...

This is a great module ! I love it ! I want to know that how can you alert an unactivated user that their account should be activated ! I know there is a mail sent, but I want to alert a user if he hasnt used the activation link and wants to log in later !

Share this post


Link to post
Share on other sites
  • 1 month later...

Bonjour téléchargé version activationbymail_2013_07_03 , sur version 1.5.6.2 ,pas de mail de confirmation , n'y de code.

Quelqu'un à t'il trouvé la solution .Merci

Share this post


Link to post
Share on other sites

Hello downloaded version activationbymail_2013_07_03, on version 1.5.6.2, no e-mail of confirmation, not it of code.

Somebody in you he found the solution. Thank you

Share this post


Link to post
Share on other sites

I also have this problem, once I put a product in the shopping cart as not registered user, in the check out, I fill the fields to register as a user but I get this error:

THECNICAL ERROR: unable to save account

Details:

Error thrown: [object Object]

Text status: error

 

if I disable the module this error does not appear.

someone got the same problem?

thanks

Share this post


Link to post
Share on other sites
  • 1 month later...

This module is brilliant but it's got a HUGE flaw. When you have guest checkout enabled then it interrupts the process and does'nt let guest to buy products ( only registered members ). However here is a workaround to this problem :) Enjoy

( go to activationbyemail.php and replace the current hookcreateaAccount function )

public function hookcreateAccount($req)
    {
		global $cookie;
		$customer = new Customer($req['newCustomer']->id);
        $customer->getFields();
		$id_lang = $cookie->id_lang;
		
		if (Tools::getValue('submitGuestAccount'))
			$_GET['display_guest_checkout'] = 1;		
		
		if (Tools::getValue('display_guest_checkout'))
		{
			if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES'))
				$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
			else
				$countries = Country::getCountries($this->context->language->id, true);
			
			if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
			{
				// get all countries as language (xy) or language-country (wz-XY)
				$array = array();
				preg_match("#(?<=-)\w\w|\w\w(?!-)#",$_SERVER['HTTP_ACCEPT_LANGUAGE'],$array);
				if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0])))
					$sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
			}
			else
				$sl_country = (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT'));
			
			$this->context->smarty->assign(array(
					'inOrderProcess' => true,
					'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
					'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
					'sl_country' => (int)$sl_country,
					'countries' => $countries
				));
		}
		else {
			
			$cookie->logout();
			$cookie->id_lang = $id_lang;
			$cookie->write();
			$activation_link = md5(uniqid(rand(), true));
			$link = $this->context->link->getModuleLink($this->name, 'activation') . '?link=' . $activation_link;

			$sql = sprintf("update %scustomer set active=0, activation_link='%s' where id_customer=%d",
						   _DB_PREFIX_, $activation_link, $req['newCustomer']->id);
			Db::getInstance()->Execute($sql);

			Mail::Send($id_lang,
					   'account_activation',
					   $this->l('Account activation'),
					   array('{firstname}' => $customer->firstname,
							 '{lastname}' => $customer->lastname,
							 '{email}' => $customer->email,
							 '{passwd}' => Tools::getValue('passwd'),
							 '{link}' => $link),
					   $customer->email,
					   NULL,
					   NULL,
					   NULL,
					   NULL,
					   NULL,
					   'modules/activationbymail/mails/');
			Tools::redirect($this->context->link->getModuleLink($this->name, 'info'));
		}
    }

BR's

Edited by senso321 (see edit history)

Share this post


Link to post
Share on other sites

This module is brilliant but it's got a HUGE flaw. When you have guest checkout enabled then it interrupts the process and does'nt let guest to buy products ( only registered members ). However here is a workaround to this problem :) Enjoy

 

( go to activationbyemail.php and replace the current hookcreateaAccount function )

public function hookcreateAccount($req)
    {
		global $cookie;
		$customer = new Customer($req['newCustomer']->id);
        $customer->getFields();
		$id_lang = $cookie->id_lang;
		
		if (Tools::getValue('submitGuestAccount'))
			$_GET['display_guest_checkout'] = 1;		
		
		if (Tools::getValue('display_guest_checkout'))
		{
			if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES'))
				$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
			else
				$countries = Country::getCountries($this->context->language->id, true);
			
			if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
			{
				// get all countries as language (xy) or language-country (wz-XY)
				$array = array();
				preg_match("#(?<=-)\w\w|\w\w(?!-)#",$_SERVER['HTTP_ACCEPT_LANGUAGE'],$array);
				if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0])))
					$sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
			}
			else
				$sl_country = (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT'));
			
			$this->context->smarty->assign(array(
					'inOrderProcess' => true,
					'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
					'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
					'sl_country' => (int)$sl_country,
					'countries' => $countries
				));
		}
		else {
			
			$cookie->logout();
			$cookie->id_lang = $id_lang;
			$cookie->write();
			$activation_link = md5(uniqid(rand(), true));
			$link = $this->context->link->getModuleLink($this->name, 'activation') . '?link=' . $activation_link;

			$sql = sprintf("update %scustomer set active=0, activation_link='%s' where id_customer=%d",
						   _DB_PREFIX_, $activation_link, $req['newCustomer']->id);
			Db::getInstance()->Execute($sql);

			Mail::Send($id_lang,
					   'account_activation',
					   $this->l('Account activation'),
					   array('{firstname}' => $customer->firstname,
							 '{lastname}' => $customer->lastname,
							 '{email}' => $customer->email,
							 '{passwd}' => Tools::getValue('passwd'),
							 '{link}' => $link),
					   $customer->email,
					   NULL,
					   NULL,
					   NULL,
					   NULL,
					   NULL,
					   'modules/activationbymail/mails/');
			Tools::redirect($this->context->link->getModuleLink($this->name, 'info'));
		}
    }

BR's

 

Hi Senso321, This did not work for me. Tested on fresh install of 1.6.0.5, and recent version of Activationbyemail.  Tested twice:

  • With Guest checkout enabled and then disabled
  • Cleared cache in admin and browser after updating php file and upon each Guest checkout option change.
  • Tested on FireFox and Chrome.

In both cases the cart cleared as soon as I registered, before activation. Just to be sure, I also completed account activation within the same browser session.

 

Does this work on your site properly? Anything else I may have missed. Would really like to use this Account activation, but has been much trouble since using it in Prestashop 1.5.

 

Much appreciated,

Daniel

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Is this module (http://addons.presta...il verification ) compatible with version 1.6.0.6? Yes or no ?

 

I have this installed on 1.6.0.5 and it works almost perfectly. Does eveytyhing necessary to verify and sends proper emails with link to activate account. However, it currently empties the shopping cart if registration is done during checkout. That is the only glitch we have noticed. I haven't seen any other free module. There are premium modules that show compatible with 1.6, but haven't tested.

Share this post


Link to post
Share on other sites

well this free module lets the customer register in full. after the customer account is registered in full without activation it calls , Hookcreateaccount() which is after the creation of full account. it will then set the customer to unactivated.  and do the further process.

so anything wrong goes in between the customer is registered in full. I would sat neat dirty risky trick. and dosent work with onepage checkout.

Share this post


Link to post
Share on other sites
  • 3 weeks later...
Bonjour à tous,

 

Quelqu'un a t-il le même problème que moi???

Je peux créer le compte, envoyer le courrier et ajouter les informations dans la base de données 

Mais je ne peux pas vous connecter avec celui-ci.

 

Aidez-moi s'il vous plaît

 

PS:je travaille avec PS 1.5.3.0

Edited by djigo2448@gmail.com (see edit history)

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 1 month later...

Currently working fine on 1.6.0.8

 

Cool little module :)

Hi Nzodie,

On your site, does this retain the items in the shopping cart after activation? Does it work with one-page checkout? On our site, it empties the shopping cart when people register and activiate during checkout.

Thanks

Share this post


Link to post
Share on other sites
  • 5 weeks later...

Hi there. You are the author of this module: New Customer Email verification and google recaptcha Module

?? If updating new versions of Prestashop, what are the conditions ?

Usually updates are free. Limited to till we add big modifications. It is usually when new version of prestashop arrives.

we have had this module since 1.3ps version and usually the 1.4 and 1.5 and 1.6  all series had new modules and within in the series no one required any modification.

 

so what was put in 1.5.0 worked till 1.5xxxx last.

 

we have kept the cost as minimum as possible for everyone to get their shops secure.

any thing else can you please ask in this post

http://www.prestashop.com/forums/topic/335984-module-new-customer-email-verification-and-google-re-captcha/?do=findComment&comment=1783316

Share this post


Link to post
Share on other sites

Usually updates are free. Limited to till we add big modifications. It is usually when new version of prestashop arrives.

we have had this module since 1.3ps version and usually the 1.4 and 1.5 and 1.6  all series had new modules and within in the series no one required any modification.

 

so what was put in 1.5.0 worked till 1.5xxxx last.

 

we have kept the cost as minimum as possible for everyone to get their shops secure.

any thing else can you please ask in this post

http://www.prestashop.com/forums/topic/335984-module-new-customer-email-verification-and-google-re-captcha/?do=findComment&comment=1783316

 

 

Thanks for your reply. It is possible to buy it in a few days. Greetings !!

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi Thank you all for the valuable email activation module. It works perfectly in 1.6 after changing '&link=' by '?link='

 

Thanks a lot.

 

Hi Pitchiah, have you tested with a new customer that adds a product to the shopping cart, then registers a new account during checkout? The account activation works, but for us, the cart is emptied when a new customer is checking out and registers during purchase process.

Thanks

Edited by Dougadanny (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites
  • 4 months later...

Hi All,

 

I'm new to this forum.

 

I installed the module in the latest version prestashop but cannot seem find it listed anywhere

 

can anyone help.

 

cheers

karl

Share this post


Link to post
Share on other sites
  • 3 months later...

Hi,

 

i dont get an activation mail. I can register and also the page pops up with the message that I will get a message.. but I dont.

 

Can anyone help please?

 

For 1.6

  • Like 1

Share this post


Link to post
Share on other sites
  • 3 months later...
  • 5 weeks later...
  • 3 months later...