Jump to content

Add footer to all emails


Recommended Posts

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 folder
and 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

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 :-) - attachicon.gifmail_generator.zip

 

Link to comment
Share on other sites

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...