stClem Posted May 11, 2010 Share Posted May 11, 2010 When a customer named etc 'Donald Duck & Co' getting a order confirmation mail, the name is changed to 'Donald Duck & Co' Someone who can help to fix it? Link to comment Share on other sites More sharing options...
Guest Posted May 12, 2010 Share Posted May 12, 2010 One simple way to fix the problem is to activate html emails. Open admin control panel > configuration > e-mail options... Use MIME HTML When Sending Emails set to "true". also make the following change in catalog/checkout_process.php find: EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" . change to: EMAIL_TEXT_INVOICE_URL . ' ' . "<a HREF='" . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL') . "'>Click Here</a> (Requires Login)\n" . Link to comment Share on other sites More sharing options...
stClem Posted May 12, 2010 Author Share Posted May 12, 2010 Thanks, but the problem is there also in the pdf invoice i have installed. Not in the regular invoice. Link to comment Share on other sites More sharing options...
Guest Posted May 12, 2010 Share Posted May 12, 2010 That is a different issue and I do not have information to help with pdf invoice. Link to comment Share on other sites More sharing options...
stClem Posted May 12, 2010 Author Share Posted May 12, 2010 I see, but isnt there anything who sends information to the mail confimration and the pdf invoice? Has to be something there? Link to comment Share on other sites More sharing options...
Guest Posted May 12, 2010 Share Posted May 12, 2010 The issues are different, it is how the information is handled. The issue with invoice pdf is located within the file catalog/admin/invoice_pdf.php but I am not familiar enough with what needs changing in that file to give you advise. Perhaps someone else will know here. Link to comment Share on other sites More sharing options...
MrPhil Posted May 12, 2010 Share Posted May 12, 2010 Obviously, at some point the "&" is changed to "&" in anticipation of this string (the company name) being displayed on a web page. Probably an htmlspecialchars() call. This is of course unnecessary for non-HTML emails, PDF invoices, etc. The first thing would be to determine whether the name is stored in the database with & or with &. Go into phpMyAdmin and browse various customer-related tables, such as "customers" and "orders", to see if & has already been changed there. If not, knowing which table(s) and field(s) it is, we will need to track down what code is calling htmlspecialchars() on it, unnecessarily for email and invoices. Then figure out whether this call can be removed, or needs a "guard" such that it only converts if the data is to be displayed in HTML. If the data comes out of the database already converted to &, or it's too difficult to guard the htmlspecialchars() call, we could wait until we're within the (non-HTML) email and PDF invoice routines, and then do a simple string replace (str_replace() call) to change & back to &. At the same time, <, >, ", and other entities could be replaced by regular text. There is a call htmlspecialchars_decode() to do this, but it requires PHP 5.1 or higher. Link to comment Share on other sites More sharing options...
stClem Posted May 13, 2010 Author Share Posted May 13, 2010 hi, thanks. Checked the database in phpmyadmin. Stored as & in both address_book and orders. Remember that the original Packing slip is correct with &. Its the confirmation mails and the pdf invoice/packing slip who is with & Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2010 Share Posted May 13, 2010 I gave you the fix for the confirmation emails, which I tested myself and it works. If you follow that information I posted, you will have fixed at least one of the issues. The pdf invoice file is different I do not know what it would take to fix that. Link to comment Share on other sites More sharing options...
stClem Posted May 13, 2010 Author Share Posted May 13, 2010 One simple way to fix the problem is to activate html emails. Open admin control panel > configuration > e-mail options... Use MIME HTML When Sending Emails set to "true". Yes, i know, this works for the mail. Didnt even need to change the catalog/checkout_process.php Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2010 Share Posted May 13, 2010 You should make the changes in catalog/checkout_process.php so that your customer can click the link provided in the email confirmation to view their order. The way the file is by default will only allow the link to be clickable if the email is plain text. In html emails, the link needs to be an html link. The changes that I posted will resolve that issue as well for you. As for the pdf invoice, I wish that I could help, but I am not familiar with that contibution or how it functions. Best of luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.