Zen Cart Logo
Forums / Basic Configuration / Changing Info Provided to Admin in CREATE ACCOUNT Email

Changing Info Provided to Admin in CREATE ACCOUNT Email

Locked

Views: 1,990

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
4 May 2007, 1:48 PM
#1
toob avatar

toob

New Zenner

Join Date:
Nov 2006
Location:
Reno, Nevada, USA
Posts:
12
Plugin Contributions:
0

Changing Info Provided to Admin in CREATE ACCOUNT Email

Greetings all,

I would like to customize the info that's shown in the Create Account email that's returned to the admin upon a new customer account creation.

It currently shows a name, an email address, and the IP, etc. (Under "Office Use Only").

I would like it to provide the complete contact details of the person upon the account creation (the info they put into the Required) portions of their account.

Is there a "quick and dirty" way for me to do this? I'm not too swift at .php but I'm learning each day, but any suggestions that anyone may have would be more than helpful, since I really don't know where to start!

Oh, and for clarification, I do know how to change the info that the admin sends to the customer ("Hi, welcome to our store, blah blah"), but I want the rest of the Customer's actual details that show under "Office Use Only."

--Melissa

5 May 2007, 5:44 PM
#2
toob avatar

toob

New Zenner

Join Date:
Nov 2006
Location:
Reno, Nevada, USA
Posts:
12
Plugin Contributions:
0

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

After some digging, I found the code I know I need to change in this file:

admin/includes/languages/english/email_extras.php

// office use only
  define('OFFICE_FROM','From:');
  define('OFFICE_EMAIL','E-mail:');

  define('OFFICE_SENT_TO','Sent To:');
  define('OFFICE_EMAIL_TO','E-mail:');
  define('OFFICE_USE','This is the information you provided');
  define('OFFICE_LOGIN_NAME','Login Name:');
  define('OFFICE_LOGIN_EMAIL','Login e-mail:');
  define('OFFICE_LOGIN_PHONE','<strong>Telephone:</strong>');

  define('OFFICE_IP_ADDRESS','IP Address:');
  define('OFFICE_HOST_ADDRESS','Host Address:');
  define('OFFICE_DATE_TIME','Date and Time:');

Now I'm trying to locate the names of the fields I need to insert (address, etc.), but I'm unsure about the OFFICE_ prefixes on the definitions.

I imagine I can't simply define a new string since this may or may not be OFFICE releated; I'm just not sure where to go from here. (I.e., I probably can't just add

   define('OFFICE_STREET_ADDRESS','Street Address:');

Or can I?

Your input is greatly appreciated, as I generally tend to flounder around in PHP. . .. . :shocking:

Thanks!!

--Melissa

5 May 2007, 5:52 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

The office email only information is built in the function email_collect_extra_info ...

This is located in the function file:
/includes/functions/functions_email.php

NOTE: there is no override for this ... be sure to backup your original and your customizations ...

5 May 2007, 6:22 PM
#4
toob avatar

toob

New Zenner

Join Date:
Nov 2006
Location:
Reno, Nevada, USA
Posts:
12
Plugin Contributions:
0

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

Hi all again,

As I continue my efforts, here is what I provided in my code:

// office use only
  define('OFFICE_FROM','From:');
  define('OFFICE_EMAIL','E-mail:');

  define('OFFICE_SENT_TO','Sent To:');
  define('OFFICE_EMAIL_TO','E-mail:');
  define('OFFICE_USE','This is the information you provided');
  define('OFFICE_LOGIN_NAME','Login Name:');
  define('OFFICE_LOGIN_EMAIL','Login e-mail:');
  define('OFFICE_LOGIN_PHONE','<strong>Telephone:</strong>');
  define('OFFICE_COMPANY','Company Name:');
  define('OFFICE_STREET_ADDRESS','Street Address:');
  define('OFFICE_CITY','City:');
  define('OFFICE_POST_CODE','Post/Zip Code:');
  define('OFFICE_STATE_TEXT','State:');
  define('OFFICE_COUNTRY_TEXT','Country:');
  define('OFFICE_IP_ADDRESS','IP Address:');
  define('OFFICE_HOST_ADDRESS','Host Address:');
  define('OFFICE_DATE_TIME','Date and Time:');

Unfortunately, my CREATE ACCOUNT email still only contains the information stated in the original code (posted above).

Any ideas?

--Melissa

5 May 2007, 6:26 PM
#5
toob avatar

toob

New Zenner

Join Date:
Nov 2006
Location:
Reno, Nevada, USA
Posts:
12
Plugin Contributions:
0

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

Ah, I hadn't checked replies, I was simply delved nose-first into the pages of code, I will try what you suggest, Ajeh :)

5 May 2007, 8:15 PM
#6
toob avatar

toob

New Zenner

Join Date:
Nov 2006
Location:
Reno, Nevada, USA
Posts:
12
Plugin Contributions:
0

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

Okay, I think I found the code that needs to be changed (both text and html):

    // generate footer details for "also-send-to" emails
    $extra_info=array();
    $extra_info['TEXT'] =
      OFFICE_USE . "\t" . "\n" .
      OFFICE_FROM . "\t" . $from . "\n" .
      OFFICE_EMAIL. "\t" . $email_from . "\n" .
      (trim($login) !='' ? OFFICE_LOGIN_NAME . "\t" . $login . "\n"  : '') .
      (trim($login_email) !='' ? OFFICE_LOGIN_EMAIL . "\t" . $login_email . "\n"  : '') .
      ($login_phone !='' ? OFFICE_LOGIN_PHONE . "\t" . $login_phone . "\n" : '') .
      ($login_fax !='' ? OFFICE_LOGIN_FAX . "\t" . $login_fax . "\n" : '') .
      OFFICE_IP_ADDRESS . "\t" . $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'] . "\n" .
      OFFICE_HOST_ADDRESS . "\t" . $email_host_address . "\n" .
      OFFICE_DATE_TIME . "\t" . date("D M j Y G:i:s T") . "\n\n";

    $extra_info['HTML'] = '<table class="extra-info">' .
      '<tr><td class="extra-info-bold" colspan="2">' . OFFICE_USE . '</td></tr>' .
      '<tr><td class="extra-info-bold">' . OFFICE_FROM . '</td><td>' . $from . '</td></tr>' .
      '<tr><td class="extra-info-bold">' . OFFICE_EMAIL. '</td><td>' . $email_from . '</td></tr>' .
      ($login !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_NAME . '</td><td>' . $login . '</td></tr>' : '') .
      ($login_email !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_EMAIL . '</td><td>' . $login_email . '</td></tr>' : '') .
      ($login_phone !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_PHONE . '</td><td>' . $login_phone . '</td></tr>' : '') .
      ($login_fax !='' ? '<tr><td class="extra-info-bold">' . OFFICE_LOGIN_FAX . '</td><td>' . $login_fax . '</td></tr>' : '') .
      '<tr><td class="extra-info-bold">' . OFFICE_IP_ADDRESS . '</td><td>' . $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'] . '</td></tr>' .
      '<tr><td class="extra-info-bold">' . OFFICE_HOST_ADDRESS . '</td><td>' . $email_host_address . '</td></tr>' .
      '<tr><td class="extra-info-bold">' . OFFICE_DATE_TIME . '</td><td>' . date('D M j Y G:i:s T') . '</td></tr>' . '</table>';
    return $extra_info;
  }

This seems significantly more complicated than the defines I posted earlier......!

5 May 2007, 8:17 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

The defines are used by the function to build the Office Use Only information ...

You can really build in anything you want in that function ...

6 May 2007, 7:53 PM
#8
toob avatar

toob

New Zenner

Join Date:
Nov 2006
Location:
Reno, Nevada, USA
Posts:
12
Plugin Contributions:
0

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

I am positive this is above my head, lol. I tried for several hours yesterday and never moved forward. :wacko:

--Melissa

7 May 2007, 2:03 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Changing Info Provided to Admin in CREATE ACCOUNT Email

You can only include information that you have defined ...

If you want the customers name, you need to have that available to you when you call that function ...

As that function is called from several places, this could mean you have to do your own select statements from the database tables so that the information can be included in the function when it is called ...