Post by Vicef » Tue Dec 27, 2016 8:07 am

Hello,
When an order has been placed, the merchant receives an order confirmation by mail (as coded in catalog_model_checkout_order.php).
I have modified the setSender as following in order to display the name of the buyer in my mailbox instead of the name of my shop:

Code: Select all

$mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
changed into

Code: Select all

$mail->setSender(html_entity_decode($order_info['payment_firstname']." ".$order_info['payment_lastname'], ENT_QUOTES, 'UTF-8'));
The problem is when a buyer name with French characters appears, then these strange characters are not correctly encoded.
For instance the name "Valérie Lastname" appears as "Amélie Lastname" as sender name in my mailbox. As far as I understand, an encoding with UTF-8 is the correct and most common way? Or do I have to use the ISO-8859-15 encoding so the code would become:

Code: Select all

$mail->setSender(html_entity_decode($order_info['payment_firstname']." ".$order_info['payment_lastname'], ENT_QUOTES, 'ISO-8859-15'));
Did anybody encounter similar problems or what is the best way to solve the problem?
I use OC 2.0.3.1 with Journal theme
Regards,
Vicef

Newbie

Posts

Joined
Wed Jun 22, 2016 7:23 pm
Who is online

Users browsing this forum: No registered users and 2 guests