Guest Posted March 14, 2007 Posted March 14, 2007 Can anyone please suggest a good contribution that will enable me to edit the content/layout of emails sent out to customers? Specifically the email that is sent out confirming the customers order. Thanks.
omar2886 Posted March 14, 2007 Posted March 14, 2007 I think there is no contributions for this. But it's so easy to do it manualy. Just have to modify the the correspondient php file inside the languages folder.
flux3000 Posted March 14, 2007 Posted March 14, 2007 I think there is no contributions for this. But it's so easy to do it manualy.Just have to modify the the correspondient php file inside the languages folder. hi i looked for this can you be more specific please eg. exact file name and folder please i have double space in the order process confirmation emails for some reason which mean more paper when printing. cheers ADMIN - I WOULD LIKE TO DELETE THIS DOUBLE POST PLEASE
flux3000 Posted March 14, 2007 Posted March 14, 2007 hi i looked for this can you be more specific please eg. exact file name and folder please i have double space in the order process confirmation emails for some reason which mean more paper when printing. cheers
Guest Posted March 14, 2007 Posted March 14, 2007 Hi, The wording for the email can be found in /includes/languages/english/checkout_process.php. Substitute "english" in the above path for alternate languages. The email itself is built in the following file: /checkout_process.php. Look for the comment //lets start with the email confirmation. You may find that removing some of the /n's will resolve your problem of additional spaces. D...
Guest Posted March 14, 2007 Posted March 14, 2007 Can anyone please suggest a good contribution that will enable me to edit the content/layout of emails sent out to customers? Specifically the email that is sent out confirming the customers order. Thanks. use something like the email templates http://www.oscommerce.com/community/contributions,2866
flux3000 Posted March 14, 2007 Posted March 14, 2007 Hi, The wording for the email can be found in /includes/languages/english/checkout_process.php. Substitute "english" in the above path for alternate languages. The email itself is built in the following file: /checkout_process.php. Look for the comment //lets start with the email confirmation. You may find that removing some of the /n's will resolve your problem of additional spaces. D... Great, thanks for fast reply! I found the file and had a look: <?php/* $Id: checkout_process.php,v 1.26 2002/11/01 04:22:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ // PWA BOF define('EMAIL_WARNING', 'ATTENTION: This email address was given to us by someone who had visited our well known online store. If this was not done by you please email us at ' . STORE_OWNER_EMAIL_ADDRESS . ' Thank you for shopping with us and have a great day.'); // PWA EOF define('EMAIL_TEXT_SUBJECT', 'Order Process'); define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:'); define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:'); define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:'); define('EMAIL_TEXT_PRODUCTS', 'Products'); define('EMAIL_TEXT_SUBTOTAL', 'Sub-Total:'); define('EMAIL_TEXT_TAX', 'Tax: '); define('EMAIL_TEXT_SHIPPING', 'Shipping: '); define('EMAIL_TEXT_TOTAL', 'Total: '); define('EMAIL_TEXT_DELIVERY_ADDRESS', 'Delivery Address'); define('EMAIL_TEXT_BILLING_ADDRESS', 'Billing Address'); define('EMAIL_TEXT_PAYMENT_METHOD', 'Payment Method'); define('EMAIL_SEPARATOR', '------------------------------------------------------'); define('TEXT_EMAIL_VIA', 'via'); ?> not sure, perhaps extra lines under each line of address etc. is something to do with the PWA contrib which is semi installed so overwrote default file and will see what happens Thanks! example of the problem Shop ------------------------------------------------------ Order Number: 12345 Detailed Invoice: http://mysite.co.uk/catalog/account_histor...p?order_id=1234 Date Ordered: Wednesday 14 March, 2007 Products ------------------------------------------------------ 1 x Free Sample = £0.00 ------------------------------------------------------ Sub-Total: £0.00 Table Rate (Best Way): £0.00 Total: £0.00 Delivery Address ------------------------------------------------------ NAME Address line 1 Address line 2 Address line 3 UK, United Kingdom Billing Address ------------------------------------------------------ Arwel Roberts Address line 1 Address line 2 Address line 3 UK, United Kingdom Payment Method ------------------------------------------------------ Check/Money Order Make Payable To: Name Send To: Name Address line 1 Address line 2 Address line 3 Address line 4 Postcode United Kingdom Your order will not ship until we receive payment. As you can appreciate it takes up loads of room / paper! PS i guess this should be in a new thread?
Guest Posted March 14, 2007 Posted March 14, 2007 Hi, What about the /checkout_process.php file. Are there lots of /n's in the email section (see previous post)? Just give me a snippet, ta. D...
flux3000 Posted March 14, 2007 Posted March 14, 2007 Hi, What about the /checkout_process.php file. Are there lots of /n's in the email section (see previous post)? Just give me a snippet, ta. D... great stuff , you are right, i should slow down and read replies properly :blush: heres the large snippet in '/checkoutprocess ' (not in language folder) // lets start with the email confirmation $email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" . ////// PWA - un comment this line to use this option (($customer_id == 0)? '' : 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"; // PWA BOF if ($customer_id == 0) { $email_order .= EMAIL_WARNING . "\n\n"; } // PWA EOF if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n"; for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n"; } if ($order->content_type != 'virtual') { $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n"; } $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $$payment; $email_order .= $payment_class->title . "\n\n"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); I notice the \n s there probably due to PWA contrib do i just take them all out / one if two? Cheers :thumbsup:
Guest Posted March 14, 2007 Posted March 14, 2007 Hi, I compared your file against mine, and they're pretty much the same. So that's not the cause of the problem. Hmm. [Thinking as I type - always dangerous] What else changed as a result of the PWA installation? Are your emails HTML or plain text (log in to admin -> configuration -> email options). My options read: sendmail; LF false false true. If your linefeeds reads CRLF then it's possible your store was configured for a windows server, but it's actually running on Linux (mine is). Change to LF and see if that fixes the problem. D...
flux3000 Posted March 15, 2007 Posted March 15, 2007 Hi, I compared your file against mine, and they're pretty much the same. So that's not the cause of the problem. Hmm. [Thinking as I type - always dangerous] What else changed as a result of the PWA installation? Are your emails HTML or plain text (log in to admin -> configuration -> email options). My options read: sendmail; LF false false true. If your linefeeds reads CRLF then it's possible your store was configured for a windows server, but it's actually running on Linux (mine is). Change to LF and see if that fixes the problem. D... Thanks D. Currently its on smpt & CRLF settings on windows (virtual) server I tried a couple of variations as suggested above 'smpt and LF' - seemed to make no difference 'sendmail and LF' got this message: Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address in F:\home\name\mysite.co.uk\catalog\includes\classes\email.php on line 502 Warning: Cannot modify header information - headers already sent by (output started at F:\hshome\superson\bestfeed.co.uk\catalog\includes\classes\email.php:502) in F:\home\name\mysite.co.uk\catalog\includes\functions\general.php on line 34 also recently had this same message when store email address had '< > ' (making me think definitely windows?) so stumped again :( or have i misread / missed something :rolleyes:
flux3000 Posted March 15, 2007 Posted March 15, 2007 or have i misread / missed something :rolleyes: Thanks D. Currently its on windows (virtual) server, with plain text emails settings smpt CRLF false false true actually i haven't said all for some reason with my host installation i have often duplicate entries in the admin config options eg. Title Value Action E-Mail Transport Method E-Mail Transport Method E-Mail Linefeeds Use MIME HTML When Sending Emails Use MIME HTML When Sending E-Mails Verify E-Mail Addresses Through DNS Verfiy E-Mail Addresses Through DNS E-Mail Linefeeds Send E-Mails Send E-Mails the plot thickens.... so thinking there could be an underlying installation / database error? :'( It was fresh install, the installed PWA, then overwrote with SPPC, and then tried to mod files to incorporate PWA with SPPC, then reverted to semi installed PWA (disabled) as had error with message above my eyes too tired to get list of files changed but it was quite a recent version PWA and SPPC will look again later
flux3000 Posted March 15, 2007 Posted March 15, 2007 It was fresh install, the installed PWA, then overwrote with SPPC, and then tried to mod files to incorporate PWA with SPPC, then reverted to semi installed PWA (disabled) as had error with message above my eyes too tired to get list of files changed but it was quite a recent version PWA and SPPC will look again later Don't have permission to edit my post for some reason, so here is more accurate version of above: It was fresh install milestone 2.2, then installed PWA, then 'overwrote' files with SPPC, (backing up files of course) and then tried to compare and replace files to incorporate PWA with SPPC, but then i reverted to SPPC with semi installed PWA (disabled) trying to solve the error with message above (one about headers - solved by taking out '<' in admin order email..... [ so in retrospect maybe linux host?!] my eyes too tired to get list of files changed but it was quite a recent version PWA and SPPC will look again later, but i do usually back up all files before changing them, so can revert.. perhaps better to do fresh install? but if have backup of database in current state (with over 1000 customers in database) will a admin or mysql 'restore' work if new database is not in same state (eg. with PWA, SPPC [ duplicate options?]
Guest Posted March 15, 2007 Posted March 15, 2007 use something like the email templateshttp://www.oscommerce.com/community/contributions,2866 Will this contribution enable me to change the layout of the email/fonts/additional information etc??
Guest Posted March 15, 2007 Posted March 15, 2007 Will this contribution enable me to change the layout of the email/fonts/additional information etc?? Yes, I think there is a formatter too with it. Or you could setup a different formatter with little effort like the tinymce.
Guest Posted March 15, 2007 Posted March 15, 2007 Yes, I think there is a formatter too with it. Or you could setup a different formatter with little effort like the tinymce. Cool, Thanks Enigma....Ill give it a wirl. Michael.
Guest Posted March 15, 2007 Posted March 15, 2007 Cool, Thanks Enigma....Ill give it a wirl. Michael. Hi Enigma, I decided that I would format the email letter manually in the catalog/checkout_process.php file and have managed to get the email looking the way I like it. Except I want to add a bit of thankyou text at the end of the email which I have defined in english/checkout_process.php called EMAIL_TEXT_THANK_YOU. However I don't know where to place it to get it to appear in the email. I want it to appear after the Payment Method information at the end of the confirmation mail. I know that I have defined it correctly as I have been able to make it appear in other parts of the email, just cant get it to appear where I want it. You can see where I have tried to place it at the end of the attached code but at the moment it is not appearing or generating any errors. Any suggestions? Cheers. $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $$payment; $email_order .= $payment_class->title . "\n\n"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], ORDER_PROCESS_EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $email_order = EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_THANK_YOU . "\n";
Guest Posted March 15, 2007 Posted March 15, 2007 oh, you have reassigned the string. $email_order = EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_THANK_YOU . "\n"; You need to add it $email_order .= EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_THANK_YOU . "\n";
Guest Posted March 15, 2007 Posted March 15, 2007 oh, you have reassigned the string. $email_order = EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_THANK_YOU . "\n"; You need to add it $email_order .= EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_THANK_YOU . "\n"; Hi Enigma, I have used your code although still the extra two bits of information arent showing at the end of the email when tested (the last seperator in the email and the thankyou note). I arent receiving any errors though. Any suffestions? Cheers.
Guest Posted March 15, 2007 Posted March 15, 2007 you need to place them before the tep_mail call that send the email out.
Guest Posted March 16, 2007 Posted March 16, 2007 you need to place them before the tep_mail call that send the email out. Hi Enigma, Thanks I got it working! I am just wondering do you know if its possible to change the font of the email sent out? at the moment it is being sent out in Times New Roman which looks really ugly. I would prefer it to be verdan or arial. Do you know where/how I can change this? Cheers. Michael.
Guest Posted March 16, 2007 Posted March 16, 2007 you could use the <span></span> tags with a css class or specify the font, color etc inside the html. Or you could setup a table, div etc. Now why you would go through all this trouble to format the mail in the old fashioned die-hard way instead of using the email templates?
Guest Posted March 16, 2007 Posted March 16, 2007 Well I tried to find one that would do all this for me but couldnt. I installed one email template contribution but all it allowed me to do from the admin section was to change the little bit of introductory text at the beginning of each email. I did find this one though: http://www.oscommerce.com/community/contri...email+templates Which seems great and could do what I want I think but it is partially in another language and the instructions seem vague. What do u think? was there a specific contribution you could suggest?
Guest Posted March 16, 2007 Posted March 16, 2007 I see, well here is what I am talking about: This is from the admin: This is the email preview. And the placeholders are automatically filled, that's the whole point how's that?
Guest Posted March 16, 2007 Posted March 16, 2007 That contribution looks great Enigma....do you have a link to where I can download it? Is it very difficult to install? Cheers.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.