Jump to content

Shop Logo been sent with email


Recommended Posts

To remove the logo from the email, comment out line 94 of classes/Mail.php:

$templateVars['{shop_logo}'] = (file_exists(_PS_IMG_DIR_.'logo.jpg')) ? $message->attach(new Swift_Message_Image(new Swift_File(_PS_IMG_DIR_.'logo.jpg'))) : '';



Of course, this means that the logo will disappear from the email and {shop_logo} will be displayed there instead. You'll need to edit all the email templates to remove the {shop_logo} text. You can also replace it with an <img> tag to the logo on your website, but that would force the customer to click to display the logo.

  • Like 1
Link to comment
Share on other sites

  • 9 months later...
  • 7 months later...

I am not sure I follow the response to this.

If you have set the email config to send HTML emails. I would expect the logo to be embedded in the email, not held as an attachment. Dependng on your email system, you may have to right click to 'download image'.

I have the same problem as the post originator, in that emails actually have the logo and order details in an attachment. this can't be right?

Link to comment
Share on other sites

  • 1 year later...
  • 5 months later...

Hi, In PS 1.5.4.1 to not attach shop logo image in emails You need to edit file classes/Mail.php

and change line 251

$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo)));

to

/*$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); */

 

This is usefull when You remove shop logo image in email templates by remove all {shop_logo} strings, and You want prevent showing logo in email attachment.

Edited by kisweb (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 1 year later...

I have two different translations and on English messages the header logo works just fine, but in translated e-mails it goes as an attachment. Any help on that?.. 
 
EDIT: I was able to locate the root cause for the fault. Everything stays correct and header logo works perfect, and looks nice as soon as i start editing the email content, that is sent to customer. Once i do any edits to the email, the header logo stops working and is sent as an attachment, instead in header place.
 
The source of the message reply_msg says this:

<td class="logo" style="border-bottom: 4px solid #333333; padding: 7px 0;" align="center"><a style="color: #337ff1;" title="{shop_name}" href="%7Bshop_url%7D"> <img src="%7Bshop_logo%7D" alt="{shop_name}" /></a>

I could of course hardcode the files themselves as a workaround and use custom image on every translation, but this would mean editin over 150 files. I also tried correcting the img src and shop url to {shop_url} format in source view, but this didn't help.

 

IMO this is a PrestaShop localization editor saving bug. Saving the changes causes the header logo reference {shop_logo} not working any more.

 

Workaround: Define your header logo manually:

 

- Take your email header logo and resize it to a size you wish to use in emails you send out (in my case 529x115)

- Open up the email editing view of the message you want to customize (in e.g. the reply_msg)

- Click on "Edit HTML Version"*

- Hover the current email header logo (this logo is not shown in the editor, in it's full size) and click on edit/insert image

- Select Image source file by clicking folder image
- Upload your header logo using the file uploader, that opens up

- Click on your image that you want to use

- Click on OK on edit/insert image view

 

Tada, you're done. Now do this always, as you edit the message content.

* You can always edit this in the source view as well, but you then need to upload the image file manually via FTP client and define the url manually.

Edited by kmn (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi, In PS 1.5.4.1 to not attach shop logo image in emails You need to edit file classes/Mail.php

and change line 251

$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo)));
to

/*$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); */
This is usefull when You remove shop logo image in email templates by remove all {shop_logo} strings, and You want prevent showing logo in email attachment.

 

It worked for disabling the logo to be sent as attachement through email. But it does not show any logo in email header.

 

please try to reslove this issue. thanx

Link to comment
Share on other sites

  • 5 months 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...