theboina Posted August 29, 2013 Share Posted August 29, 2013 (edited) Hi!Someone know what I have to do to remove email logo attach in Prestashop 1.5.3.1 when Prestashop send emails when an order state is changed? (the logo is html embebed, we don't like that it will be attached as file in the email).Thanks!!!Prestashop Version 1.5.3.1 Edited September 2, 2013 by theboina (see edit history) Link to comment Share on other sites More sharing options...
avtuk Posted August 31, 2013 Share Posted August 31, 2013 I have the same question as you. I don't really know how to remove logo attachment in outgoing emails. Please help. Thanks. Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 31, 2013 Share Posted August 31, 2013 go to modules>mails alerts>ur language folder > en for english>u will find the template Link to comment Share on other sites More sharing options...
avtuk Posted August 31, 2013 Share Posted August 31, 2013 I don't really get what you state above. My question is how to revemove logo attached to every email sending out to customers. Please can anyone help? Thanks. Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 31, 2013 Share Posted August 31, 2013 can u please show on a screenshot Link to comment Share on other sites More sharing options...
avtuk Posted August 31, 2013 Share Posted August 31, 2013 Please find attached. I don't want to attach my website's logo to every email sending out to customers. Thanks. Link to comment Share on other sites More sharing options...
El Patron Posted August 31, 2013 Share Posted August 31, 2013 using ftp, find classes/Mail.php there you will find code that assigns the logo, note the following code is from 1.5.5.0. You can basically comment out the code that assigns the logo. NOTE I DID NOT TEST THIS...MAKE SURE TO FIRST MAKE A BACK UP OF THIS FILE http://screencast.com/t/HJZtbPi1wy 3 Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted August 31, 2013 Share Posted August 31, 2013 i think el patron's solution will solve i checked mail templates files they only send shop name,powered by prestshop and other details Link to comment Share on other sites More sharing options...
El Patron Posted August 31, 2013 Share Posted August 31, 2013 i think el patron's solution will solve i checked mail templates files they only send shop name,powered by prestshop and other details I am like you, I would have thought it was a field in the template....it's a complicated business..jajajaja Link to comment Share on other sites More sharing options...
avtuk Posted August 31, 2013 Share Posted August 31, 2013 Thank you. I will try. Link to comment Share on other sites More sharing options...
theboina Posted September 1, 2013 Author Share Posted September 1, 2013 If I comment this line: /* if (isset($logo)) $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); */ In version 1.5.3.1 doesn't works. It is sending the logo attach in email... What's wrong? Thx Link to comment Share on other sites More sharing options...
El Patron Posted September 1, 2013 Share Posted September 1, 2013 (edited) here is 'untested' code for 1.5.3.1 Note I added two lines of code surrounded by comment if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'))) $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'); else { if (file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO'))) $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO'); else $template_vars['{shop_logo}'] = ''; } //don't attach logo unset($logo); $template_vars['{shop_logo}'] = ''; //end of dont' attach logo /* don't attach the logo as */ if (isset($logo)) $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); Edited September 1, 2013 by El Patron modified $logo = null to an unset (see edit history) 1 1 Link to comment Share on other sites More sharing options...
avtuk Posted September 1, 2013 Share Posted September 1, 2013 The code above also works for PS 1.5.4.1. Thanks a lot. 1 Link to comment Share on other sites More sharing options...
theboina Posted September 2, 2013 Author Share Posted September 2, 2013 It works fine for 1.5.3.1 too. Thanks!!!!! Note: Review that you don't have any Mail.php in override dir, if you are changing classes/Mail.php directly ;-) Thanks a lot to "El Patron" Link to comment Share on other sites More sharing options...
kotkotan Posted October 1, 2013 Share Posted October 1, 2013 (edited) not work for me. Presta 1.5.4.1. Have remove logo from email template and comment lines in classes/Mail.php: /* if (isset($logo)) $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); */ Edited October 1, 2013 by kotkotan (see edit history) Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted October 1, 2013 Share Posted October 1, 2013 (edited) read here Edited October 1, 2013 by Jiten rash (see edit history) Link to comment Share on other sites More sharing options...
kotkotan Posted October 2, 2013 Share Posted October 2, 2013 read here it is not resolve problem. i'm talking about logo of the store. it always attached to emails and removing it from email template not help. Link to comment Share on other sites More sharing options...
gkorolkov Posted December 12, 2013 Share Posted December 12, 2013 (edited) In my case I wanted to prevent PS from attaching the logo to emails and have {shop_logo} variable contain path to the logo image saved on the server in PS folder. In this case the logo would still appear in emails but would not be embedded in them. Here is what did: In /classes/Mail.php I commented out the following two lines: if (isset($logo)) $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); and added another line of code right below: $template_vars['{shop_logo}'] = Tools::getHttpHost(true).__PS_BASE_URI__.'img/'.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop); For this to work you need to have an email logo image uploaded in BO->Settings->Themes. My PS version is 1.5.6.1. Edited December 12, 2013 by gkorolkov (see edit history) Link to comment Share on other sites More sharing options...
giallofanatic Posted January 10, 2015 Share Posted January 10, 2015 HI would this (below) also work for Prestashop 1.6.9? Would the image path be the same also. Many thanks In my case I wanted to prevent PS from attaching the logo to emails and have {shop_logo} variable contain path to the logo image saved on the server in PS folder. In this case the logo would still appear in emails but would not be embedded in them. Here is what did: In /classes/Mail.php I commented out the following two lines: if (isset($logo)) $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); and added another line of code right below: $template_vars['{shop_logo}'] = Tools::getHttpHost(true).__PS_BASE_URI__.'img/'.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop); For this to work you need to have an email logo image uploaded in BO->Settings->Themes. My PS version is 1.5.6.1. Link to comment Share on other sites More sharing options...
kmn Posted January 28, 2015 Share Posted January 28, 2015 SImilar issue here. The header logo is sent in translated emails as an attachment. In English language this header works just perfect, but not in translated mails. I have not touched to header in the mail itself. Also another issue: The generated link in translated emails do not work anymore..... Any help? Link to comment Share on other sites More sharing options...
edvinaszu Posted February 20, 2015 Share Posted February 20, 2015 (edited) Same problem to me. Tryed everything. 1.6.0.11 version. Edited February 20, 2015 by edvinaszu (see edit history) Link to comment Share on other sites More sharing options...
Ourø Posted April 24, 2015 Share Posted April 24, 2015 Same problem 1.6.0.14 Link to comment Share on other sites More sharing options...
edvinaszu Posted April 24, 2015 Share Posted April 24, 2015 Hi. Tomorrow i will write solution, i solved it. Its not simple was. Link to comment Share on other sites More sharing options...
edvinaszu Posted April 25, 2015 Share Posted April 25, 2015 Hi, I solved with this topic. Read all. https://www.prestashop.com/forums/topic/413406-solved-email-templates-urls-broken-after-editing-and-saving-%7B-%7D/ Link to comment Share on other sites More sharing options...
LucasV Posted July 28, 2015 Share Posted July 28, 2015 here is 'untested' code for 1.5.3.1 Note I added two lines of code surrounded by comment if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'))) $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'); else { if (file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO'))) $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO'); else $template_vars['{shop_logo}'] = ''; } //don't attach logo unset($logo); $template_vars['{shop_logo}'] = ''; //end of dont' attach logo /* don't attach the logo as */ if (isset($logo)) $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); This worked for me in Prestashop 1.6.14 Do note that the logo will be deleted in all email messages! Link to comment Share on other sites More sharing options...
Cebul Posted May 9, 2017 Share Posted May 9, 2017 using ftp, find classes/Mail.php there you will find code that assigns the logo, note the following code is from 1.5.5.0. You can basically comment out the code that assigns the logo. NOTE I DID NOT TEST THIS...MAKE SURE TO FIRST MAKE A BACK UP OF THIS FILE http://screencast.com/t/HJZtbPi1wy Thanks for solution. It works but I want to delete logo attachment only in mail alerts (confirmation email to admin). How to do this? Link to comment Share on other sites More sharing options...
Recommended Posts