Andrus Posted May 15, 2015 Share Posted May 15, 2015 Hello Theres a topic of what to comment out on mail.php to remove shop name from e-mail subjects and how, but it is a little different on Prestasthop 1.6. What to comment out there? Also the same problem with e-mail logo attachment, how to remove it from PS 1.6 . There are some topics, but theres actually not written what exactly to comment out and the codes on different versions are different. Thanks Link to comment Share on other sites More sharing options...
Steelstyle Posted June 2, 2015 Share Posted June 2, 2015 Hello! Also interested in this question. Simple removal of mail.php obtained uncorrectly. Link to comment Share on other sites More sharing options...
Steelstyle Posted June 3, 2015 Share Posted June 3, 2015 so still have a solution? please tell me! Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2015 Share Posted June 3, 2015 you have to alter email templates under localization > translations > email translations section in your back office you can mange contents of emails and also titles of emails there Link to comment Share on other sites More sharing options...
Steelstyle Posted June 3, 2015 Share Posted June 3, 2015 Thank you for the answer! I know how to edit the message. I am wondering how to remove the name of the store and the store logo, are inserted automatically in all messages. I've seen solutions for other versions, but they are not appropriate 1.6. Need to fix the classes-mail.php. but I do not know how to do it correctly. Link to comment Share on other sites More sharing options...
Andrus Posted June 3, 2015 Author Share Posted June 3, 2015 Hello Steelstyle. Im the original poster who asked this. Unfortunately nobody answered, but somehow I worked this out myself later. To remove shop name from subject I changed in classes/mail.php line 281 $subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject; i changed to $subject = $subject; ___________________________ To remove logo attachment from e-mail i changed the same file: Lines 305 and 306 if (isset($logo)) $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); I just deleted these two lines. It seems that it did what I needed, but Im not sure is this the best and safest way to do this, so if you decide to try it make a backup from your mail.php If anyone has a better solution please let us know 3 Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2015 Share Posted June 3, 2015 sooo it is attachment! now everythnig is clear for menice guide Andrus! Link to comment Share on other sites More sharing options...
Steelstyle Posted June 3, 2015 Share Posted June 3, 2015 Thank you, Andrus! this is what was needed! Link to comment Share on other sites More sharing options...
stoo_s Posted June 16, 2015 Share Posted June 16, 2015 I'm also looking to remove the shop name from the subject line of emails but my classes/mail.php file appears to be different to what is outlined above. I don't have any $subject code in there. The closest thing i have is $message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject); but when I edit this it just stops sending the email altogether. I'm using version 1.6.0.9. Should I try to replace the mail.php file with the latest version and then change the code? Or could I add the code to the file I already have? Any help would be much appreciated. Stuart Link to comment Share on other sites More sharing options...
Andrus Posted June 16, 2015 Author Share Posted June 16, 2015 I'm also looking to remove the shop name from the subject line of emails but my classes/mail.php file appears to be different to what is outlined above. I don't have any $subject code in there. The closest thing i have is $message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject); but when I edit this it just stops sending the email altogether. I'm using version 1.6.0.9. Should I try to replace the mail.php file with the latest version and then change the code? Or could I add the code to the file I already have? Any help would be much appreciated. Stuart That is not the rigth line to edit. Look line 281 or somewhere there: $subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject; and change it to $subject = $subject; Link to comment Share on other sites More sharing options...
stoo_s Posted June 16, 2015 Share Posted June 16, 2015 Hi Andrus, Thanks for your really swift reply! Line 281 in my mail.php file looks like this: $template_vars['{color}'] = Tools::safeOutput(Configuration::get('PS_MAIL_COLOR', null, null, $id_shop)); I have no idea why it's different to those found by others above. Link to comment Share on other sites More sharing options...
Andrus Posted June 16, 2015 Author Share Posted June 16, 2015 Ok well sorry Im not an expert on this Used prestashop for only 1 month Maybe your version of prestashop is a little different then or maybe you have already changed the file. My thoughts are you should try to search PS_SHOP_NAME and try to figure out where it is connected to subject somewhere. But like I said, I am not a programmer and just using logic in this case Link to comment Share on other sites More sharing options...
stoo_s Posted June 17, 2015 Share Posted June 17, 2015 Thanks for the advice but I've managed to solve this now. It appears that version 1.6.0.9 has different code in the mail.php file to that outlined above. I downloaded the latest version 1.6.0.14, and then used the mail.php file from there. I then edited the new version as suggested above and all is working perfectly! Hope this helps others in the future. Stuart Link to comment Share on other sites More sharing options...
aliaspt Posted September 1, 2015 Share Posted September 1, 2015 Thanks for the advice but I've managed to solve this now. It appears that version 1.6.0.9 has different code in the mail.php file to that outlined above. I downloaded the latest version 1.6.0.14, and then used the mail.php file from there. I then edited the new version as suggested above and all is working perfectly! Hope this helps others in the future. Stuart Stuart, are you saying that the newer version of mail.php is compatible with 16.0.9? Does it still work for you? Thanks. Link to comment Share on other sites More sharing options...
stoo_s Posted September 2, 2015 Share Posted September 2, 2015 Hi aliaspt, Yes, I've found that it has been compatible and we've certainly had no problems so far and have been up and running for a few weeks now. As always, I would suggest that you back up any files before changing them though and remember that you'll need to edit the new file as above to achieve the desired outcome. Hope it helps! Link to comment Share on other sites More sharing options...
GrandeLupo Posted May 22, 2017 Share Posted May 22, 2017 (edited) Hi to all guys,I ask for a hand to a pretty serious problem.I recently passed from version 1.6.1.4 to 1.6.1.12.As I expected, after the update, the subject of emails I send to my customers, and when I receive them, I submit the full name of the site.I mean:Now:[Store-name] Payment Accepted[store-name] Pending preparation[store name] CanceledI WANT TO LEARN:Payment AcceptedOngoing preparationCanceled To do this I opened the Mail.php file, and to the string number 298 I deleted the bit: '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '. from /* Create mail and attach differents parts */ $subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject; $message->setSubject($subject);to /* Create mail and attach differents parts */ $subject = $subject; $message->setSubject($subject); Now, BO will no longer receive and send emails. I can no longer send notifications to customers.I do not get orders or anything else in my inbox.And in "Advanced Parameters > Email" , the page no longer exists.In FO, customers can no longer send a message.And they do not even receive Status Updates and everything that spins in sending / receiving emails.To restore, and save the savvy, I downloaded the original file by sending it to the server, but nothing settled.Because? Why has not everything been restored?Is there a way to fix the store?How do I edit the email object in 1.6.1.12, without causing damage to the store? Thank you always in advance for everyone.Hello Edited May 22, 2017 by GrandeLupo (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now