dragon_kz Posted July 6, 2013 Share Posted July 6, 2013 Hi! Problem is prestashop using shop name as email's "from" header. My shop name is too long. So, where i can configure it? Thanks. Link to comment Share on other sites More sharing options...
PSfever.com Posted July 6, 2013 Share Posted July 6, 2013 Hi, you can edit this individually in mails/ISOofYourCountry/template.html (or in theme/Yourtheme/mails/ISOofYourCountry/template.html). Look for the variable {shop_name} and replace it manually by the name of your shop or delete it competely. Best way would be to download Notepad++ and download the whole folder with the emails. Then you open one of the templates, press ctrl+h select FInd and replace all in the folder and you replace variable {shop_name} with whatever you want. Once you hit replace all, it simply replaces every occurence of {shop_name} with whatever you want. If you're done, upload it back to server. WARNING, FIRST BACK UP EVERYTHING! ANYTHING CAN HAPPEN! Link to comment Share on other sites More sharing options...
dragon_kz Posted July 6, 2013 Author Share Posted July 6, 2013 Hi, you can edit this individually in mails/ISOofYourCountry/template.html (or in theme/Yourtheme/mails/ISOofYourCountry/template.html). Look for the variable {shop_name} and replace it manually by the name of your shop or delete it competely. Best way would be to download Notepad++ and download the whole folder with the emails. Then you open one of the templates, press ctrl+h select FInd and replace all in the folder and you replace variable {shop_name} with whatever you want. Once you hit replace all, it simply replaces every occurence of {shop_name} with whatever you want. If you're done, upload it back to server. WARNING, FIRST BACK UP EVERYTHING! ANYTHING CAN HAPPEN! Thanks. I have a prestashop 1.5.4 version and i can't find that template.html file in \mails\ru or in my themes folder Link to comment Share on other sites More sharing options...
PSfever.com Posted July 6, 2013 Share Posted July 6, 2013 Thanks. I have a prestashop 1.5.4 version and i can't find that template.html file in \mails\ru or in my themes folder Have you opened the HTML file in a notepad to see the source code? those folders are either Root/mails/ru/*.html or Root/themes/Nameoftheme/mails/ru/*.html Link to comment Share on other sites More sharing options...
dragon_kz Posted July 6, 2013 Author Share Posted July 6, 2013 Have you opened the HTML file in a notepad to see the source code? those folders are either Root/mails/ru/*.html or Root/themes/Nameoftheme/mails/ru/*.html in Root/mails/ru/ i have many html and txt files. Im view this files and i see only content of the email sending. But i need to edit email from header. Prestashop using shop_name as from header of mail send. This is screen from email service. First 2 from titles is wrong. Last 2 is good. For example in php : mail([b]$from[/b],$to,) Example of file in Root/mails/ru/ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Сообщение от {shop_name}</title> </head> <body> <p>Сообщение от {shop_name}</p> <table style="font-family: Verdana,sans-serif; font-size: 11px; color: #374953; width: 550px;"> <tbody> <tr> <td align="left"><a title="{shop_name}" href="{shop_url}"><img style="border: none;" src="{shop_logo}" alt="{shop_name}" /></a></td> </tr> <tr> <td> </td> </tr> <tr> <td align="left">Здравствуйте, <strong style="color: #7a7879;">{firstname} {lastname}</strong></td> </tr> <tr> <td> </td> </tr> <tr> <td style="background-color: #7a7879; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Ваши учетные данные для авторизации</td> </tr> <tr> <td> </td> </tr> <tr> <td align="left">E-mail: <strong><span style="color: #7a7879;">{email}</span></strong> <br /> Пароль: <strong>{passwd}</strong></td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #7a7879; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a></td> </tr> </tbody> </table> </body> </html> Link to comment Share on other sites More sharing options...
PSfever.com Posted July 6, 2013 Share Posted July 6, 2013 Oh, I missunderstood, my fault - sorry. So if I got it right this time - you want to change the email of the sender? Is this what you want to achieve? Link to comment Share on other sites More sharing options...
dragon_kz Posted July 6, 2013 Author Share Posted July 6, 2013 Oh, I missunderstood, my fault - sorry. So if I got it right this time - you want to change the email of the sender? Is this what you want to achieve? I want to change sender to simply: Sitename.kz Link to comment Share on other sites More sharing options...
PSfever.com Posted July 6, 2013 Share Posted July 6, 2013 Ok, go to Backoffice -Preferences-"Contact stores"-Store details- change the name p.e. to SHOP. Now try to create new order let's see what you'll recieve. 1 Link to comment Share on other sites More sharing options...
dragon_kz Posted July 13, 2013 Author Share Posted July 13, 2013 Ok, go to Backoffice -Preferences-"Contact stores"-Store details- change the name p.e. to SHOP. Now try to create new order let's see what you'll recieve. no. I need to set from name. I find the code in file on class/mail.php . $from_name . this what i need. im try to edit by assign to $from_name variable, but no effect. Link to comment Share on other sites More sharing options...
dragon_kz Posted August 25, 2013 Author Share Posted August 25, 2013 SOLVED! i find it! classes/mail.php line 271: $send = $swift->send($message, $to, new Swift_Address($from, $from_name)); change to $send = $swift->send($message, $to, new Swift_Address($from, 'YOUR EMAIL FROM NAME')); 2 Link to comment Share on other sites More sharing options...
vekia Posted August 25, 2013 Share Posted August 25, 2013 thanks for your solution, im convinced that it will be really helpfull for other merchants here with similar problem im going to mark this topic as [sOLVED] best regards Link to comment Share on other sites More sharing options...
mike_sc Posted August 27, 2014 Share Posted August 27, 2014 Hi, i thought by reading this topic I will solve my problem, but seems not working for me. I have presta 1.6.0.8 with Leo Mobile theme.I've updated classes/mail.php following dragon_kz solution and it doesn't work. Case is that in the 'FROM' while sending an e-mail not even full shop name is displayed but something like this: '1st part of [email protected] 2nd part of shop name'. This is really weird. I tried digging in BO but didn't succed. That concerns mail alert sent by the system when order was placed and paid for example. Any help?Struggling with it for hours already.... Link to comment Share on other sites More sharing options...
Recommended Posts