Forums / General Questions / Need Welcome email to contain Office Use Only information

Need Welcome email to contain Office Use Only information

Locked

Started by mcarbone on 3 Sep 2009, 10:22 PM · Views: 1,288

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
3 Sep 2009, 10:22 PM
#1
mcarbone avatar

mcarbone

Zen Follower

Join Date:
Feb 2009
Location:
Simi Valley, CA
Posts:
99
Plugin Contributions:
0

Need Welcome email to contain Office Use Only information

Hi fellow zenners,

I want to display the "Office Use Only" information section in the Welcome email that is sent to customers, not just in the admin copied email.

I started by trying to move this code located in includes/modules/create_account.php:

$extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);
      $html_msg['EXTRA_INFO'] = $extra_info['HTML'];

to right below this line:

$html_msg['EMAIL_MESSAGE_HTML']  = str_replace('\n','',EMAIL_TEXT);
    $html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\n','',EMAIL_CONTACT);
    $html_msg['EMAIL_CLOSURE']       = nl2br(EMAIL_GV_CLOSURE);

Am I at least on the right path?

I don't think the includes/languages/english/create_account.php file nor the includes/languages/english/email_extras.php files need to be modified...but I am obviously primative at PHP programming so I could be wrong.

My theory is that there is an if statement somewhere that says...
"if this is an admin copy of the email...then print Office Use Only in the email" - basically I need to take away this condition.

Thanks a million always to the awesome zen community for your help.
MCarbone

3 Sep 2009, 10:25 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Need Welcome email to contain Office Use Only information

mcarbone:

I want to display the "Office Use Only" information section in the Welcome email that is sent to customers, not just in the admin copied email.
Dare I ask why?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Sep 2009, 10:30 PM
#3
mcarbone avatar

mcarbone

Zen Follower

Join Date:
Feb 2009
Location:
Simi Valley, CA
Posts:
99
Plugin Contributions:
0

Re: Need Welcome email to contain Office Use Only information

:blush:

My client feels that this might clear confusion, should it arise from customers. I told her that the "from" is redundat, the email too, account name, login email...well just about all of it is redundant.

The client may think that if this is there in the email, then information would more likely be verified, or to prevent unwanted account openings.

Thank you,

Mcarbone

3 Sep 2009, 10:34 PM
#4
mcarbone avatar

mcarbone

Zen Follower

Join Date:
Feb 2009
Location:
Simi Valley, CA
Posts:
99
Plugin Contributions:
0

Re: Need Welcome email to contain Office Use Only information

oopsy daisy...Zen Version 1.3.8

MC

3 Sep 2009, 10:55 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Need Welcome email to contain Office Use Only information

I agree with you that it's redundant. And I think it even makes things look unprofessional (ie: customers don't ever expect to see stuff intended only for the store administrator).

Nevertheless, if it's necessary to do it, change this:```
// send welcome email
zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');

// send additional emails
if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO !='') {
  if ($_SESSION['customer_id']) {
    $account_query = "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax
                        from " . TABLE_CUSTOMERS . "
                        where customers_id = '" . (int)$_SESSION['customer_id'] . "'";

    $account = $db->Execute($account_query);
  }

  $extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);
  $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
  zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT,
  $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
} //endif send extra emails

by re-arranging it somewhat so it's like this:
if ($_SESSION['customer_id']) {
$account_query = "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax
from " . TABLE_CUSTOMERS . "
where customers_id = '" . (int)$_SESSION['customer_id'] . "'";

    $account = $db->Execute($account_query);
  }

  $extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);
  $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
// send welcome email
zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');

// send additional emails
if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO !='') {
  zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT,
  $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
} //endif send extra emails
I wouldn't edit any language files for it, unless you wanted to change the words "Office Use Only" to something else.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Sep 2009, 11:40 PM
#6
mcarbone avatar

mcarbone

Zen Follower

Join Date:
Feb 2009
Location:
Simi Valley, CA
Posts:
99
Plugin Contributions:
0

Re: Need Welcome email to contain Office Use Only information

Worked like charm Dr. Byte!!!!:clap:

I changed the includes/modules/create_account.php file as suggested.

I agree that this will also look unprofessional to a customer and will take your suggestion by changing the
/includes/languages/english/email_extras.php define statement here

define('OFFICE_USE','<strong>Office Use Only:</strong>');

to say something like:

define('OFFICE_USE','<strong>Confidential Use Only:</strong>');

...or something like that.

Thanks a million!

Mcarbone