Page 2 of 3

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Wed Nov 10, 2010 3:15 am
by LeorLindel
For multi-languages

In catalog/controller/account/create.php

After:

Code: Select all

		$this->data['text_newsletter'] = $this->language->get('text_newsletter');
Add:

Code: Select all

		$this->data['text_registration'] = $this->language->get('text_registration');
		$this->data['text_new_registration'] = $this->language->get('text_new_registration');

After:

Code: Select all

$mail->send();
Add:

Code: Select all

      //Q: Send additional email to store owner.
      $this->load->model('localisation/country');
       $this->load->model('localisation/zone');
        $country = $this->model_localisation_country->getCountry($this->request->post['country_id']);
        $zone = $this->model_localisation_zone->getZone($this->request->post['zone_id']);
   
        $subject = $this->language->get('text_registration') . ' ' . $this->request->post['firstname'] . ' ' . $this->request->post['lastname'];
        $message = $this->language->get('text_new_registration') . ' ' . $this->config->get('config_name') . '.' . "\n\n";
        $message .= $this->language->get('entry_firstname') . ' ' . $this->request->post['firstname'] . "\n";
        $message .= $this->language->get('entry_lastname') . ' ' . $this->request->post['lastname'] . "\n";
        $message .= $this->language->get('entry_email') . ' ' . $this->request->post['email'] . "\n";
        $message .= $this->language->get('entry_telephone') . ' ' . $this->request->post['telephone'] . "\n";
        $message .= $this->language->get('entry_fax') . ' ' . $this->request->post['fax'] . "\n";
        $message .= $this->language->get('entry_company') . ' ' . $this->request->post['company'] . "\n";
        $message .= $this->language->get('entry_address_1') . ' ' . $this->request->post['address_1'] . "\n";
        $message .= $this->language->get('entry_address_2') . ' ' . $this->request->post['address_2'] . "\n";
        $message .= $this->language->get('entry_city') . ' ' . $this->request->post['city'] . "\n";
        $message .= $this->language->get('entry_zone') . ' ' . $zone['name'] . "\n";
        $message .= $this->language->get('entry_postcode') . ' ' . $this->request->post['postcode'] . "\n";
        $message .= $this->language->get('entry_country') . ' ' . $country['name'] . "\n";
        $message .= ($this->request->post['newsletter']) ? $this->language->get('entry_newsletter') . ' ' . $this->language->get('text_yes') : $this->language->get('entry_newsletter') . ' ' . $this->language->get('text_no');

        $mail->setSubject($subject);
        $mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
        $mail->setTo($this->config->get('config_email'));
        $mail->send();
In catalog/language/english/account/create.php

After:

Code: Select all

$_['text_agree']           = 'I have read and agree to the <a class="thickbox" href="index.php?route=information/information/loadInfo&create=1" alt="%s"><b>%s</b></a>';
Add:

Code: Select all

$_['text_registration']	   = 'New Customer Registration:';
$_['text_new_registration']= 'A new customer just registered at';

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Wed Nov 10, 2010 6:31 am
by i2Paq
Thanks, will give it a go!

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Thu Nov 11, 2010 6:51 pm
by i2Paq
Works like a charm.

Just one question, how do I change the Subject of the e-mail send to the Store-owner, it now uses the one that goes to the customer: "Store-name - Thank you for registering!"

I would like it to show: "New customer registration at - Store-name"

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Wed Dec 08, 2010 12:24 pm
by thegeekz
Hmm, this should be added to the OpenCart system programme... as a mainstay.... instead of having to mod the codes... I'm sure most of the users here of Open Cart, support this!

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Wed Jan 19, 2011 5:20 am
by broadsighted
sonofrodrigo wrote:
Qphoria wrote:1. EDIT: catalog/controller/account/create.php

2. FIND:

Code: Select all

$mail->send();
3. AFTER, ADD:

Code: Select all

//Q: Send additional email to store owner.
$mail->setTo($this->config->get('config_email'));
$mail->send();
To get the name of the new customer, add the following (substituted for step #3 above):

Code: Select all

//Q: Send additional email to store owner.
$new_subject = 'New Customer Registration: ' . $this->request->post['firstname'] . ' ' . $this->request->post['lastname'];
$mail->setSubject($new_subject);
$mail->setTo($this->config->get('config_email'));
  $mail->send();
You'll receive the same email the customer does, but the subject line will instead read "New Customer Registration: Firstname Lastname".
Both of you: thank you so much! This did the trick.

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Sat May 28, 2011 2:55 pm
by werepair
works like a charm in 1.4.9.5 8)

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Wed Jun 01, 2011 5:42 am
by opencartisalright
Anyone know how to get this mod working in OC 1.5? I checked and there is no catalog/controller/account/create.php file to edit.

Thanks.

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Wed Jun 01, 2011 6:02 am
by celestial
\catalog\language\english\mail\customer.php and \catalog\model\account\customer.php

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Thu Jun 02, 2011 4:54 am
by i2Paq
It is already sending a registration e-mail.
The down side is that you get an e-mail with an link only..., not very useful.

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Fri Jun 03, 2011 3:28 am
by opencartisalright
celestial wrote:\catalog\language\english\mail\customer.php and \catalog\model\account\customer.php
Awesome. Thank you so much for pointing this out! :)

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Fri Jun 03, 2011 3:29 am
by opencartisalright
i2Paq wrote:The down side is that you get an e-mail with an link only..., not very useful.
Yeah but if you follow the instructions in this thread you can expand the registration e-mail to include a lot of information. It works on 1.5 too, I just couldn't find the file to edit. Thanks to celestial for pointing out where it was.

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Fri Jun 03, 2011 5:52 pm
by i2Paq
opencartisalright wrote:
i2Paq wrote:The down side is that you get an e-mail with an link only..., not very useful.
Yeah but if you follow the instructions in this thread you can expand the registration e-mail to include a lot of information. It works on 1.5 too, I just couldn't find the file to edit. Thanks to celestial for pointing out where it was.
I know, I have this mod in my current store and will use it when I move to 1.5.x in January 2011.

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Sat Jul 23, 2011 3:55 am
by amanda26
I'm using the code posted by d7a7z7e7d ... http://forum.opencart.com/viewtopic.php ... 14#p100192

I've received several alert emails for registrations requiring approval however, one customer registered while I was signed in to the administration area. I noticed the new, un-approved account show up under Customers but did NOT receive the alert email. Is there something in the code that doesn't allow alerts to be sent while logged in to administration?

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Mon Sep 19, 2011 6:20 pm
by markman-b
Dear OC users,

I'm using OC 1.5.1.2. Can this step be skipped for for OC 1.5.1.2 users?

After:

Code: Select all

$this->data['text_newsletter'] = $this->language->get('text_newsletter');
Add:

Code: Select all

$this->data['text_registration'] = $this->language->get('text_registration');
$this->data['text_new_registration'] = $this->language->get('text_new_registration');
I skipped it because I could not find:

Code: Select all

$this->data['text_newsletter'] = $this->language->get('text_newsletter');
in catalog\model\account\customer.php

I just made a new customer testaccount. Everything seems to work fine, but it would be nice if someone is willing to confirm my question to avoid SQL problems in future.

kind regards,
Markman-B

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Mon Jan 16, 2012 11:46 am
by badboybackagain
I would be very thankful if someone from us can creat a vqmod for OC 1.5.1.3. Its bit confusing. Please help.

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Mon Jan 16, 2012 12:24 pm
by LeorLindel
It's here.

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Mon Jan 16, 2012 1:07 pm
by badboybackagain
thanks LeorLindel....but its not free :( ....anyways thanks a ton for your reply...

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Fri Feb 03, 2012 6:37 am
by eddie_d
d7a7z7e7d wrote:Here is the code to add more details to the e-mail.

After:

Code: Select all

$mail->send();
Add:

Code: Select all

//Q: Send additional email to store owner.
$this->load->model('localisation/country');
$this->load->model('localisation/zone');
$country = $this->model_localisation_country->getCountry($this->request->post['country_id']);
$zone = $this->model_localisation_zone->getZone($this->request->post['zone_id']);
	
$subject = 'New Customer Registration: ' . $this->request->post['firstname'] . ' ' . $this->request->post['lastname'];
$message = 'A new customer just registered at ' . $this->config->get('config_name') . '.' . "\n\n";
$message .= 'First Name: ' . $this->request->post['firstname'] . "\n";
$message .= 'Last Name: ' . $this->request->post['lastname'] . "\n";
$message .= 'E-Mail: ' . $this->request->post['email'] . "\n";
$message .= 'Phone: ' . $this->request->post['telephone'] . "\n";
$message .= 'Fax: ' . $this->request->post['fax'] . "\n";
$message .= 'Company: ' . $this->request->post['company'] . "\n";
$message .= 'Address 1: ' . $this->request->post['address_1'] . "\n";
$message .= 'Address 2: ' . $this->request->post['address_2'] . "\n";
$message .= 'City: ' . $this->request->post['city'] . "\n";
$message .= 'Region/State: ' . $zone['name'] . "\n";
$message .= 'Post Code: ' . $this->request->post['postcode'] . "\n";
$message .= 'Country: ' . $country['name'] . "\n";
$message .= ($this->request->post['newsletter']) ? 'Newsletter: Yes' : 'Newsletter: No';
			
$mail->setSubject($subject);
$mail->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));
$mail->setTo($this->config->get('config_email'));
$mail->send();
Hi, I know it's been a while since the last post on this topic but I am new to opencart. I am using ver1.5.1.3 which does not have catalog/controller/account/create.php as stated but looking at \catalog\language\english\mail\customer.php and \catalog\model\account\customer.php the above is not in either customer.php file so where does it go?

please help.

Regards

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Fri Feb 10, 2012 6:53 pm
by distvan
My question is connecting to here:

When I set on the admin page 'Approve new Customers' and registered a test user I get the following message: You will be notified by email once your account has been activated by the store owner.

The store owner how and where can activate the registered user on the admin in opencart version 1.5.1.3.1 ??

Re: [MOD] Send Alert Email when a new user has registered?

Posted: Sat Feb 11, 2012 10:15 am
by Qphoria
This is a very old thread. Send alert on registration has been added since v1.4.9.4 and already exists in all versions of 1.5.x. It is on the system-settings area on the mail tab "New Account Alert Email"

This mod is likely very outdated and not meant for 1.5.x