Jump to content

[SOLVED] Removing logo attached to the transactional email sent from Prestashop (PS 1.6)


Recommended Posts

You will need to edit the mails and remove the logo code you will need to do this for every mail you do not want the logo to show.

 

Here is the code you need to remove

 

<tr>
       <td align="center" class="logo" style="border-bottom:4px solid #333333;padding:7px 0">
            <a title="{shop_name}" href="{shop_url}" style="color:#337ff1">
               <img src="{shop_logo}" alt="{shop_name}" />
           </a>
</td>
</tr>
Link to comment
Share on other sites

I already edited all the email template removing the original code and linked a logo I uploaded on my server, the problem it's that other than the new logo into the email i still see the logo (uploaded into the PS setting page) as attachment, and I don't know i to remove this attachment.

Link to comment
Share on other sites

I see it into the email sent to customers, I notice that after adding and order for a customer using my email.

 

Here's an example of email where, other that my logo added to the bottom, I see also the logo attached to the email (t's not the same logo, because the logo showed at the bottom has been changed, while the attached one, it's the old version).

 
<center>
<table style="background: white;" border="0" width="560" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="20"> </td>
<td><br />
<p><img style="border: none;" src="[url=https://www.mywebsite.it/img/email/header-ordine-spedito.png]https://www.mywebsite.it/img/email/header-ordine-spedito.png[/url]" alt="" width="429" height="224" /> <br /><br /><br /> <span style="color: #333; font-size: 22px!important;">Ciao {firstname},</span><br /><span style="color: #333; font-size: 16px!important;">siamo lieti di informarti che <strong>il tuo ordine (nr. {id_order}) è stato spedito.</strong></span></p>
<p style="color: #333; font-size: 16px;">L'ordine verrà consegnato dal nostro corriere nel giro di 1 o 2 giorni lavorativi. Ti è già stata inviata un'email da parte del nostro corriere con tutti i dettagli, incluso il link per poter seguire la spedizione.</p>
<p style="color: #333; font-size: 16px;">Per qualsiasi informazione sull'ordine e sulla sua consegna puoi contattarci telefonicamente al numero <strong>800.xxx.xxx</strong> oppure tramite email all'indirizzo <a href="mailto:[email protected]?subject=Informazioni su ordine nr. {id_order}">[email protected]</a>.</p>
<p style="color: #333; font-size: 16px;">Inoltre ti ricordiamo che puoi rivedere questo ordine dalla sezione <a style="color: #ff6600; font-weight: bold; text-decoration: none;" href="{shop_url}history.php">"Cronologia ordine"</a> del tuo account cliccando su <a style="color: #ff6600; font-weight: bold; text-decoration: none;" href="{shop_url}my-account.php">"Il mio account"</a> nel nostro sito web.</p>
<p style="color: #333; font-size: 16px;">Grazie ancora per averci scelti!</p>
<p> </p>
<center><a title="" href="[url=https://www.mywebsite.it]https://www.mywebsite.it[/url]" target="blank"><img style="border: none;" src="https://www.mywebsite.it/img/email/logo.png" alt="" width="380" height="63" /></a></center>
<p><br /><br /></p>
</td>
<td width="20"> </td>
</tr>
</tbody>
</table>
</center>
Edited by DARKF3D3 (see edit history)
Link to comment
Share on other sites

I had a look at the Mail::Send function in classes/Mail.php and I see the following on lines 313-316:
            /* don't attach the logo as */
            if (isset($logo)) {
                $template_vars['{shop_logo}'] = $message->embed(Swift_Image::fromPath($logo));
            }

Perhaps it's the $message->embed that's attaching the image? You can try deleting that code to see if it removes the attachment.

Link to comment
Share on other sites

Thank you, I just tried on a website I use for testing and it seem that without that coded (i commented them) the PS logoit's not attached.

 

This line of code are involved only in the transactional email? I'm wondering if removing this codes could create any problem somewhere else.

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

  • 5 years later...
  • 2 months later...
On 9/22/2021 at 2:01 PM, DARKF3D3 said:

Does anyone know how to do this on PS1.7.7?

Same principle: /classes/Mail.php

I deleted line 506

$templateVars['{shop_logo}'] = $message->embed(\Swift_Image::fromPath($logo));

 

Link to comment
Share on other sites

  • 2 years 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...