j4tan Posted January 1, 2006 Share Posted January 1, 2006 ok this is driving me crazy, spending my 2006 1st day in front of computer. I am trying to add the store logo in all the emails being send to customer, be it registration emails, forgotten password, orders email or even just newsletter. I can't seem to find any files to alter it. so far i have been looking into mail.php, create_account.php, orders.php but can't find the section to at least add in a log on top of each mail :( anyone give me a hand? Thanks. Link to comment Share on other sites More sharing options...
vasttech Posted January 1, 2006 Share Posted January 1, 2006 That is one bad thing about OSC is that the e-mails are built directly in the files, and there is no "easy" way to edit them. With a little hacking and testing though it is very possible and can be done. I believe there is a contribution too, that will allow you to customize the e-mail messages through the admin area, but I can't remember (rough night and I am a little tired right now). Anyway, if you look in the create_account.php file you will find a section of code: $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING . "\n" . "\n"; $email_text .= "\n" . MAIL_VALIDATION . "\n" . '<a href="' . tep_href_link('pw.php', 'action=reg&pass=' . $Pass . $Pass_neu . '&id=' . $id, 'SSL', false) . '">' . VALIDATE_YOUR_MAILADRESS . '</a>' . "\n" . "\n" . '(' . SECOND_LINK . ' ' . tep_href_link('pw.php', 'action=reg&pass=' . $Pass . $Pass_neu . '&id=' . $id, 'SSL', false) . ' )' . "\n" . "\n" . OR_VALIDATION_CODE . $Pass . $Pass_neu . "\n" . "\n"; tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); If you play around with this you can figure out how the e-mails are constructed. Things like EMAIL_CONTACT etc, are defined in the language files. The email that is sent when someone checks out is in the checkout_process.php file. You will find a similar section of code as above. Hope that helps. Happy New Year! :thumbsup: osCommerce Knowledge Base osCommerce Documentation Contributions Link to comment Share on other sites More sharing options...
Nacer Posted January 1, 2006 Share Posted January 1, 2006 The following should help: http://www.oscommerce.info/kb/osCommerce/C...ea/E-Mails_Sent Regards, Nacer. Link to comment Share on other sites More sharing options...
j4tan Posted January 1, 2006 Author Share Posted January 1, 2006 thanks ;) still scrubbing my head :( Link to comment Share on other sites More sharing options...
j4tan Posted January 2, 2006 Author Share Posted January 2, 2006 ok, after reinstalling and hacking the code a bit (with my knowledge limitation) i create this line of code in create_account.php <-- catalog/create_account.php $image = tep_image(DIR_WS_IMAGES . 'top_logo.gif'); and then i added $image in the following code like this: $email_text .= $image . EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING; the position of the image is not an issue atm, i received email with this image but in broken link, i.e not showing graphic at all but only a RED X any help would be appreciated. Thanks. Link to comment Share on other sites More sharing options...
j4tan Posted January 3, 2006 Author Share Posted January 3, 2006 The following should help: http://www.oscommerce.info/kb/osCommerce/C...ea/E-Mails_Sent Regards, Nacer. hi there, i tried still no luck, all the images appear in the order process mail has big red cross :( this is how i add the link following instruction from above URL. $email_order = STORE_NAME . "\n" . tep_image(DIR_WS_IMAGES . 'logo.jpg') . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "'>" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "</a>\n" . //EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n"; if ($order->info['comments']) { Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.