How to customize PrestaShop Email Templates

In this tutorial you are going to learn how to customize the default email templates that are used to notify new customers and how to use alternative templates for new affiliates, using the Affiliates Pro for PrestaShop module.

We will assume that your PrestaShop installation folder is called prestashop. Where exactly it is located depends on your server environment. For example, it could be /var/www/prestashop or ~/public_html/prestashop – if you are unsure where your PrestaShop files are located, please ask your web administrator or your hosting provider.

The default Email Templates

PrestaShop mails folderPrestaShop’s email templates are found in prestashop/mails. For each language, you will find a subfolder with the email templates. For example, prestashop/mails/de for German email templates, prestashop/mails/en for the templates in English etc.

For each template, you will find two versions, one HTML and another plain text version. We will be customizing the notification email that is sent to new customers below. The relevant files are account.html and account.txt, holding respectively the HTML and the plain text versions of the notification sent to new customers.

You can customize these using the built-in translation interface on the administrative back office, and it’s also easy to customize these by simply copying them to the appropriate destination as shown below.

Using the built-in, Back Office Translation Functions

Go to Localization > Translations and in the section Modify Translations, under Type of translation choose Email templates translations and under Select your theme you can either choose to customize the core templates by selecting Core (no theme selected) or for example using default-bootstrap for the default theme. Once you click Modify, you will be taken to the list of available templates.

Localization Translation Email Templates

Click the one you wish to customize and the editors which allow you to edit the HTML and the plain text version will unfold.

Localization Translations account template

If you have chosen to modify theme-specific templates, you will find the core templates have been copied to the theme’s mails subfolder.

Coding customized Email Templates

If you don’t use the back office functions to customize the email templates for your theme, you can copy the appropriate files manually and modify them using your favorite IDE or text editor. The advantage of this method is that it gives you more fine-grained control over the code used in the templates, compared to using the HTML editor provided in the back office.

Account email templates in the theme folderIn your theme, you need to create the mails subfolder, which will hold customized email templates for each language in an appropriate subfolder. For example, for the English language, you will add your customized templates in your theme’s mails/en subfolder.

Here we are going to modify the default-bootstrap theme. Given that if you update your theme, your changes or additions might be lost, it could be more appropriate to derive a copy of the theme you use and add your templates there instead. Unfortunately PrestaShop still does not support child themes, which would make it easier. In any case, keep a backup of your modified theme and email templates.

As an example, let’s assume you are using the default-bootstrap theme, create the following subfolder prestashop/themes/default-bootstrap/mails/en and copy the original templates account.html and account.txt there.

Now you can modify these templates as desired and they will be used instead of the defaults. In the example files provided in the repository mentioned below, we simply add “Happy Shopping!” to the default templates.

Using alternative Email Templates

The above is fine if you don’t need to send different emails depending on what type of account is created. Here we are going to see how to use a different template for new affiliates than the one which is used for new customers.

As there is no hook which we could use to select a different template conditionally, we need to override the sendConfirmationMail method of the AuthController class.

AuthController Override

To do that, we need to create the file prestashop/override/controllers/front/AuthController.php and implement this method.

AuthController override folder

Our implementation is based on the original method, but with a conditional section that is used to select a different template if the account notification is sent to a new affiliate.

AuthController Affiliate Account Email

We will be using two new template files for that, account-affiliates.html and account-affiliates.txt which we need to place both in prestashop/themes/default-bootstrap/mails/en.

For our customized method to work, it’s important to have overrides enabled, so check that overrides are not disabled under Advanced Parameters > Debug Mode > Disable all overrides : NO. Also clear the cache there if needed.

All files are available in this GitHub repository, where you will find them in their corresponding subfolders.

In our affiliate-specific account creation email template, we also provided a new template variable which we use to indicate the URL to the affiliate area: {affiliate_area_url} – we use it in both the HTML and the plain text versions of the email templates.


Note that you could add any additional template variables in the same manner, or you could use the actionGetExtraMailTemplateVars hook.

Demo Affiliate Email

This is an example of how you could welcome new affiliates to your partner program, using the Affiliates Pro for PrestaShop module and affiliate-specific templates.

, , ,

17 Responses to How to customize PrestaShop Email Templates

  1. Gamer September 4, 2020 at 10:49 am #

    I am using Prestashop and have just noticed that the contact form (customer service) is not working. It always brings the error “An error occurred while sending the message”. I use the PHP mail function for the shop, all other messages are also sent correctly. If the customer leaves a message when ordering, this will also be transmitted and displayed in the Admin customer service. Only the contact form brings this error.

    • Kento September 4, 2020 at 9:35 pm #

      Hi, I would ask PrestaShop support directly, they probably don’t support that version anymore though.

  2. Theholytech September 4, 2020 at 10:44 am #

    Hi, I tried updating my template, and works fine on the backend, but keep sending my email with the default template. Why is that?

    • Kento September 4, 2020 at 9:34 pm #

      Hi there, you should probably get in touch with general support for PrestaShop for that.

  3. Kento November 9, 2019 at 9:04 pm #


    This sounds very much like what you see on one machine is the cached previous version. Try clearing all caches.


  4. Siddharth October 7, 2019 at 8:42 pm #

    Thanks for writing article on email templates [explained guide], it has very useful information.

    • Kento October 8, 2019 at 8:34 pm #

      Hi Siddharth,

      Thanks, glad to hear it was useful for you!


  5. seak March 12, 2019 at 7:30 am #

    Hi, Did all this, tried both the translation option and changing the template on the server. But non of the changes have any effect. It’s also strange the changes made in one solution do not show up in the other. But they are saved and do show up even on an other computer with an other browser. But only either in the translation section or on the server. Other changes like product updates in the backoffice or adjustments on the server work as expected.

  6. Austin Kean July 1, 2018 at 6:17 am #

    Curious, how does Prestashop compare to WooCommerce? Which is more superior?

    • Kento August 1, 2018 at 10:56 am #

      Hi Austin,

      For what it’s worth, I find WooCommerce easier to handle and more powerful both as a user and a developer. But then it’s a matter of what system suits your specific requirements most.


  7. Kim Kiri April 17, 2017 at 8:57 am #

    Well done, it work for me
    Thanks for detail post!

    • Kento April 17, 2017 at 10:15 am #

      Great to hear, many thanks for your feedback 🙂

  8. Gerard April 12, 2017 at 6:04 pm #

    Hi, Did all this, tried both the translation option and changing the template on the server. But non of the changes have any effect. It’s also strange the changes made in one solution do not show up in the other. But they are saved and do show up even on an other computer with an other browser. But only either in the translation section or on the server. Other changes like product updates in the backoffice or adjustments on the server work as expected.

    • antonio June 2, 2017 at 7:33 am #

      Hi Gerard,
      Maybe it’s a problem with the cache, you can try to clear the cache.
      Also, you can check if your theme has a ‘mails’ folder
      Kind Regards,
      Antonio B.

  9. Jonas Berglund December 18, 2016 at 10:54 pm #

    Really good explanation, i’m trying to to the translation way but im getting an error message saying


    You don’t have permission to access /wz4vny1jdtxne6xc/index.php on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    What could this be?

    • Kento December 22, 2016 at 7:50 am #

      Hi Jonas,

      Is it possible that the directory where the translations are stored is not writable by the server? Can you check the owner and the permissions on that folder?


Leave a Reply to antonio Click here to cancel reply.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account