Zen Follower
- Join Date:
- Mar 2005
- Posts:
- 229
- Plugin Contributions:
- 0
Post #1 by hubert
Hello,
I'm trying to embed the packing slip into the Order Confirmation mail sent to the admin.
I dug into the php files and I'm there :
- The order confirmation mail sent to admin and customer are the same but the admin gets some more infos call $extra_infi added to the message.
-This message and the $extra_info is made by the /includes/functions/functions_email.php file in which I found the email_collect_extra_info function (around line 400)
-The packing slip is made by the /admin/packingslip.php
I also found the php include function and tried to modify functions_email.php to get the packing slip in the admin's email message :
$extra_info['HTML'] = include ('admin/packingslip.php') . '<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;
But the answer is
> [error] PHP Warning: include() Bla bla bla for inclusion (include_path='.:/usr/local/php5/lib/php') in /Users/vartan/Sites/piccolo/catalog/includes/functions/functions_email.php on line 460
I found that I had to modify packingslip.php so that there's nor <HEAD> nor <BODY> tags in it, because these tags are already made by functions_email.php.
So I duplicated the packingslip.php file, called it packingslipMy.php, removed the tags, and correct the include syntax.
But the answer is the same.
As you must have understood I'm not a PHP coder and I'm sure I'm missing something but I don't know what.
Thanks for your advices and help
Regards
Hubert