sini Posted September 13, 2017 Share Posted September 13, 2017 Dear, I would like to add footer to all email, how can I do it? Ideally I want to add something like {include file='.\footer.html'}. I found solution only for 1.5.6 - https://www.prestashop.com/forums/topic/269842-include-footerhtml-code-in-email-templates-as-php-include-not-supported/ -- Thx, Tomas Link to comment Share on other sites More sharing options...
Scully Posted September 14, 2017 Share Posted September 14, 2017 Unfortunately we do not know which version you have in use. But the approach might be quite the same. Link to comment Share on other sites More sharing options...
catalin.pop Posted September 20, 2017 Share Posted September 20, 2017 Not sure if this is what you're looking. For Prestashop 1.7 you can do something like this: Open Mail.php from \prestashop171\classes with a text editor. Search for $templateVars['{shop_name}'] You'll see something like this: $templateVars['{shop_name}'] = ... $templateVars['{shop_url}'] = .... .. add another variable like this: $templateVars['{my_footer}'] = "My cool footer"; if you want to read the footer from a file you can do like this: $myFooter= file_get_contents('/path/to/footer.html'); $templateVars['{my_footer}'] = $myFooter; make sure path/to/footer.html file exists. Then go to your email templates in prestashop/mails folderand add the variable {my_footer} where you want to appear in your template. You might need to add the variable in every template file. After that you only need to change the footer.html file in case you want to replace the footer. Link to comment Share on other sites More sharing options...
sini Posted September 20, 2017 Author Share Posted September 20, 2017 Thank you for your answers, but I decided to change my mind. I want more than just add footer I want add images, change css, etc. So I made for my purpose mail generator for prestashop email templates. If somebody would like to do the same, it's free for use :-) - mail_generator.zip Link to comment Share on other sites More sharing options...
catalin.pop Posted September 20, 2017 Share Posted September 20, 2017 Cool. You can add as many variables as you want with the procedure I explained. Good luck with your email generator. Thank you for your answers, but I decided to change my mind. I want more than just add footer I want add images, change css, etc. So I made for my purpose mail generator for prestashop email templates. If somebody would like to do the same, it's free for use :-) - mail_generator.zip 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