Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › Product name in cyrillic (product name getting messed up in the email)
Tagged: Language
- This topic has 5 replies, 3 voices, and was last updated 13 years, 2 months ago by admin.
-
AuthorPosts
-
August 15, 2011 at 11:01 am #4061dmitrikartashovMember
Hi there,
I have an issue when the product name is in cyrillic. When its added to the thank you email and on the thank you page it gets replaced.
In the email its replaced with spaces and on the page with � !
I think its something to do with charset.
The actual product name is – Отличная фигура – на всю жизнь!
Can you help?
August 15, 2011 at 11:25 pm #35509amin007ParticipantIs your database created in UTF-8 format? You can log into your PHPMyAdmin and check the charset type for your database tables. If you never used PHPMyAdmin then this article should help:
August 16, 2011 at 8:54 am #35510dmitrikartashovMemberYes, all tables are – utf8_general_ci.
When I go to product admin page, the name and descriptions all come out fine as they should. I also checked the product table and the ‘Name’ value is stored correctly.
The problem only appears when the product name is displayed in the email and thank you page.
August 16, 2011 at 11:57 pm #35511amin007ParticipantI think I know what the issue is… when PayPal send the notification it sends the data using a different charset than UTF-8 so those names gets messed up. Not sure if you can set anything in your PayPal profile to tell PayPal to send the data back using UTF-8 format.
Anyway, here is a quick fix for you that should work:
1. Correct the product name in the email
Open the “paypal.php” file and search for the following line of code:
$cart_item_data_name = trim($current_cart_item['item_name']); //$retrieved_product->name;
Once you find it change it to the following:
$cart_item_data_name = $retrieved_product->name;
2. Correct the product name on the Thank You page
Open the “eStore_includes3.php” file and search for the following line of code:
$cart_item_data_name = trim($current_cart_item['item_name']); //$retrieved_product->name;
Once you find it change it to the following:
$cart_item_data_name = $retrieved_product->name;
This should make it to where it will use the product name from the database rather than the value sent from PayPal.
August 17, 2011 at 10:14 am #35512dmitrikartashovMemberHi there,
This has fixed the issue. Many thanks for a quick fix and a great plugin.
Dmitri
September 20, 2011 at 1:49 am #35513 -
AuthorPosts
- You must be logged in to reply to this topic.