Jump to content

How do i prevent logo as attachment?


Andreasjj

Recommended Posts

It would appear that you would need to have modifications made to the classes/Mail.php file.

 

at or around line 239, you would need to modify

  if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop)))
   $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop);
  else
  {
   if (file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop)))
 $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop);
   else
 $template_vars['{shop_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)));

 

I will move this to development for better results.

Link to comment
Share on other sites

It would appear that you would need to have modifications made to the classes/Mail.php file.

 

at or around line 239, you would need to modify

  if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop)))
$logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop);
  else
  {
if (file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop)))
 $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop);
else
 $template_vars['{shop_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)));

 

I will move this to development for better results.

Thank you for your reply, but i am new to coding.

It would be perfect if you could tell me exactly what to change.

 

EDIT: Por favor señor :)

Edited by Andreasjj (see edit history)
Link to comment
Share on other sites

Thank you for your reply, but i am new to coding.

It would be perfect if you could tell me exactly what to change.

 

EDIT: Por favor señor :)

 

no time today...this is why I moved post to development...maybe someone can make the change and test it for you. but if you want to make native core changes...and can't do it yourself...development is a good place to post

 

 

if you need immediate help I can move this to the paid section where you can hire it out for probably a reasonable rate

Link to comment
Share on other sites

no time today...this is why I moved post to development...maybe someone can make the change and test it for you. but if you want to make native core changes...and can't do it yourself...development is a good place to post

 

 

if you need immediate help I can move this to the paid section where you can hire it out for probably a reasonable rate

 

Thank you, i hope someone has a solution :)

Link to comment
Share on other sites

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...