Aonken Posted February 11, 2020 Share Posted February 11, 2020 Hi there I added all logos in the template configuration. the logos are showed ok on the website, but in the emails the logo is TOO BIG. Where can I find the code for the email layout to change the size? or where can I delete the logo so that the email doesn't contain a logo image. Thanks in advance for your help. best regards Link to comment Share on other sites More sharing options...
NPO Posted February 11, 2020 Share Posted February 11, 2020 Hi, In 1.7.6... if the Email Logo still shows up too big you can make more changes by editing the email translation files. (you can change the code or click on the image and change the settings). Link to comment Share on other sites More sharing options...
Aonken Posted February 12, 2020 Author Share Posted February 12, 2020 Thanks for your answer.🌹 Sorry, but I'm new with Prestashop and I don't know where to find theses files or image options... Can you please tell me: Where can I find the email translation files? and Where do I find the image to click on to change the image setting? Best regards Link to comment Share on other sites More sharing options...
Aonken Posted February 12, 2020 Author Share Posted February 12, 2020 I looked trough all the options and found the translations files. I changed the image settings and tried to save the file but following error message appears: Request Entity Too Large The requested resource does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit. In which directory can I find these files? I could download them, change the settings and upload them again... best regards Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 12, 2020 Share Posted February 12, 2020 Hi, You can find the email templates in mails/{language_iso_code} folder. {language_iso_code} means language code like en es (Check the same according to your store language). In this language folder, You will find numerous file. These files are being used for different conditions like Order Email, Status Update email etc. Link to comment Share on other sites More sharing options...
Aonken Posted February 12, 2020 Author Share Posted February 12, 2020 (edited) Great, thanks! 🌹 I found them😊 But in the code of each file there's no image settings: Where can I change the image size settings? best regards Edited February 12, 2020 by Aonken (see edit history) 1 Link to comment Share on other sites More sharing options...
NPO Posted February 12, 2020 Share Posted February 12, 2020 (edited) Editing the email templates in 1.7.6 is a bit...... well.... adventurous.... One sure way of changing all the email logos is: make sure you have the logo in the size you want for the emails, upload to server - go to your email directory e.g. classic /mails/ - go to /themes/modern/components/ edit header.html.twig look for: .... <a href="{shop_url} target="_blank"> <img height="auto" src="{shop_logo}" ..... change to <img src="http://server/path/img.png"........ check the "height" in the next line. Should do the job,- without getting 'random' changes. Edited February 12, 2020 by NPO (see edit history) Link to comment Share on other sites More sharing options...
Aonken Posted February 13, 2020 Author Share Posted February 13, 2020 (edited) Thank you very much for your answer! 🌹 I uploaded the image with the correct size, did the changes in the header.html.twig for classic and modern themes and cleared browser cache. Unfortunately nothing changed with the logo size... it still the same too big size...😢 Where can I try to change this size? It has to be a simple thing, I think... Here the changed code: <tr> <td> <a href="{shop_url}" target="_blank"> <img src="/aonken.ch/public_html/shop/img/aonken-shop-logo_mail-1581424438.jpg" alt="{shop_name}" style="border:0;display:block;outline:none;text-decoration:none;height:81px;width:90px;font-size:13px;"> </a> </td> </tr> Edited February 13, 2020 by Aonken added more information (see edit history) Link to comment Share on other sites More sharing options...
imran1336 Posted February 13, 2020 Share Posted February 13, 2020 Great, thanks! 🌹 I found them Link to comment Share on other sites More sharing options...
NPO Posted February 13, 2020 Share Posted February 13, 2020 Make sure you re-generate your email templates for the classic theme. Backup your /mails/ directory first (this doesn't always go as planned). Then: Design - Email Theme -Generate emails.(depeding on what changes you made - make sure to overwrite the templates). Then clear all cache (absolutely everything) and check again using the same page (design - email themes - email themes (bottom of page) - use the HTTP option to see if the changes have taken effect. While working on this you can also set your templates to force complication - dashboard - configure - advanced parameters - performance - cache = no and template complliation = force. Link to comment Share on other sites More sharing options...
NPO Posted February 13, 2020 Share Posted February 13, 2020 After generating the themes things should work - I tested with a green square (didn't change the default center for the classic theme). Link to comment Share on other sites More sharing options...
Aonken Posted February 13, 2020 Author Share Posted February 13, 2020 I did it as you indicated and it works, great! 😀 The only thing is that the logo is now an attachment of the email and it doesn't appear in the email body... Link to comment Share on other sites More sharing options...
NPO Posted February 13, 2020 Share Posted February 13, 2020 If we disable 'sending email logo as attachement' it will default to 'nothing' or to sending the general theme logo again. Looks like that it not an option in prestashop 1.7.6.3. Ok this is odd, but that is not unusual for 1.7,- with x.6.3 they turned the email templates upsidedown.... so, I reset everything - restored everything to default installation.... Under: Design - Theme and Logo uploaded the (special) Logo for Emails.... then manually cleared all cache went back to BO picked modern as my theme - saved. regenerated all email templates stopped sql server manually cleared all cache incl browser restarted sql server and this time it accepted the logo in the correct size (the default size as uploaded) without any changes to the templates (this time it's a blue something). -> Not a good idea but - We can disable embed attachements here: (move the */ to the end of the line.) /classes/Mail.php -> /* don't attach the logo as */ if (isset($logo)) { $template_vars['{shop_logo}'] = $message->embed(Swift_Image::fromPath($logo)); } Link to comment Share on other sites More sharing options...
Sysel Posted April 23, 2020 Share Posted April 23, 2020 Hi, I have the same issue but found out it might be trouble in Outlook. As I see Aonken use that too. I let Prestashop send mail alerts to multiple mail accounts. Forpsi web mail client doesnt show anything except mail item, but some online mail services show logo and whole message alright. Maybe it's related to Outlook issue with resizing pictures even in signatures. Unfortunatelly I haven't find any solution of this issue despite many people is dealing with that. Some customers for sure use Outlook, so I removed logo in mail template, but there is crossed-circle sign instead which doesn't look good, suggest better solution in source code. Petr Link to comment Share on other sites More sharing options...
nahlik Posted June 9, 2020 Share Posted June 9, 2020 Hi, I've just had the same problem in 1.7.6.5 with a huge logo in emails and I’ve resolved it in a completely different way, using only Photoshop. PrestaShop resizes the image proportionally to the full width of the email. I have prepared the email logo as a very long image (width 2000 px, hight 70 px) with my logo in the left corner, saved it using Save As PNG in the highest quality and loaded it to PrestaShop. Result as expected. Simple and effective in any email programs or sites. Link to comment Share on other sites More sharing options...
benisevme Posted June 11, 2020 Share Posted June 11, 2020 On 6/9/2020 at 7:18 PM, nahlik said: Hi, I've just had the same problem in 1.7.6.5 with a huge logo in emails and I’ve resolved it in a completely different way, using only Photoshop. PrestaShop resizes the image proportionally to the full width of the email. I have prepared the email logo as a very long image (width 2000 px, hight 70 px) with my logo in the left corner, saved it using Save As PNG in the highest quality and loaded it to PrestaShop. Result as expected. Simple and effective in any email programs or sites. Hello, if you do that, your shop's logo will be modified as well. I have tried to style the img tag for shop logo in emails however it doesn't recognise the style given on html. Do you have an idea to give style attribute to the shop logo only in emails? Link to comment Share on other sites More sharing options...
nahlik Posted June 11, 2020 Share Posted June 11, 2020 Hi, In my case, this logo is now used only in all emails, but haven't influenced my main shop logo, which is defined elsewhere. Of course correcting the code would by much more elegant, but I was in a hurry, I work with Photoshop everyday, and as a retired programmer I feel much less comfortable in HTML5. I hope that this evident bug will be corrected, or the best solution found by someone better knowing the code of PrestaShop 1.7 and HTML5 than me. Link to comment Share on other sites More sharing options...
benisevme Posted June 11, 2020 Share Posted June 11, 2020 It is being attached as a file to emails. Link to comment Share on other sites More sharing options...
nahlik Posted June 11, 2020 Share Posted June 11, 2020 15 minutes ago, benisevme said: It is being attached as a file to emails. That's why I'm not going to risk changing any code, as long as my simple graphic solution works OK for me. A better solution will be welcome here... Link to comment Share on other sites More sharing options...
benisevme Posted June 11, 2020 Share Posted June 11, 2020 27 minutes ago, nahlik said: That's why I'm not going to risk changing any code, as long as my simple graphic solution works OK for me. A better solution will be welcome here... I fixed the issue by reverting back to original and changed the logo size through theme settings. But there is still logo is being attached but not seen as a picture, stays as an attachment. I will check the issue and share the solution here. 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