PDA

View Full Version : New Customer Emails v1.0



michael_s
01-09-2012, 04:00 PM
Step 2 by Cheepnis contains some errors in the code. Your emails will break up with the code as it is.

The correct code should be:

++++++++++++++++++++++++++++++++
2. EDIT: /catalog/create_account.php
++++++++++++++++++++++++++++++++

AROUND line 270, FIND:

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

REPLACE it with the following:

tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// Email Admin About New Customer - Start

$new_costumer_email_to_admin = ADMIN_EMAIL_WELCOME ."nn"
. ADMIN_EMAIL_TEXT ."n"
. "================================================== =n"
. ADMIN_EMAIL_FIRSTNAME . $firstname . "n"
. ADMIN_EMAIL_LASTNAME . $lastname . "n"
. ADMIN_EMAIL_EMAIL . $email_address . "n"
. ADMIN_EMAIL_TELEPHONE . $telephone . "n"
. ADMIN_EMAIL_COMPANY . $company . "n"
. ADMIN_EMAIL_FAX . $fax . "n"
. ADMIN_EMAIL_STREET_ADDRESS . $street_address . "n"
. ADMIN_EMAIL_STREET_ADDRESS2 . $suburb . "n"
. ADMIN_EMAIL_CITY . $city . "n"
. ADMIN_EMAIL_STATE . $state . "n"
. ADMIN_EMAIL_POSTCODE . $postcode . "n"
. ADMIN_EMAIL_COUNTRY . $country . "n";
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT2, $new_costumer_email_to_admin, $name, $email_address);

// Email Admin About New Customer - End

++++++++++++++++++++++++++++++++
3. EDIT: /catalog/includes/languages/english/create_account.php
++++++++++++++++++++++++++++++++

Add the following anywhere before the closing "?>" :

// Email Admin About New Customer - Start

define('ADMIN_EMAIL_WELCOME', 'Hello Michael!');
define('ADMIN_EMAIL_TEXT', 'A new customer has just registered:');
define('ADMIN_EMAIL_FIRSTNAME', 'First Name: ');
define('ADMIN_EMAIL_LASTNAME', 'Last Name: ');
define('ADMIN_EMAIL_EMAIL', 'E-mail: ');
define('ADMIN_EMAIL_TELEPHONE', 'Phone: ');
define('ADMIN_EMAIL_COMPANY', 'Company: ');
define('ADMIN_EMAIL_FAX', 'Fax: ');
define('ADMIN_EMAIL_STREET_ADDRESS', 'Address: ');
define('ADMIN_EMAIL_STREET_ADDRESS2', 'Address: ');
define('ADMIN_EMAIL_CITY', 'City: ');
define('ADMIN_EMAIL_STATE', 'County: ');
define('ADMIN_EMAIL_POSTCODE', 'Post Code: ');
define('ADMIN_EMAIL_COUNTRY', 'Country Code: ');
define('EMAIL_SUBJECT2', 'New customer registered on: ' . STORE_NAME);

// Email Admin About New Customer - End

++++++++++++++++++++++++++++++++
4. Test it! You're done!
++++++++++++++++++++++++++++++++

More... (http://addons.oscommerce.com/info/2001)