[Prestashop help] How to 39 Prestashop Email Templates works in the Prestashop?

1. Email template: guest_to_customer.html, guest_to_customer.txt

When does this email send?

  • In Prestashop Backoffice, go to  Customers menu, Click to view a Customer Information, click Transform to a customer account button, the guest_to_customer” email will be sent to this Guest account

email-template-2

  • When you receive any emails from a Prestashop Store, if your email is a Guest account, you can view a message in email footer like “If you have a guest account, you can follow your order via the…”, if you click on Guemail-template-3est Tracking link, it will redirect to a Prestashop Store and automatic transform your account from Guest to a Customer account ->  the “guest_to_customer” email will be sent.

What is PHP file execute this function?

  • PHP file: classes\Customer.php

2. Email template: account.html, account.txt

When does this email send?

  • After an New user registered in Prestashop website, an “account” email will be sent to welcome this account as “Thank you for creating a customer account at…”
  • After a Guest account click Guest Tracking in any email’s footer.

What is PHP file execute this function?

  • PHP file: classes\form\CustomerPersister.php

3. Email template: in_transit.html, in_transit.txt

When does this email send?

  • When you update Shipping information of an Order through Prestashop Web Service.
  • When you update Shipping information (tracking number, shipping cost…) from Backoffice with an admin account.

email-template-4

What is PHP file execute this function?

  • PHP file: classes\order\OrderCarrier.php

4. Email template: download_product.html, download_product.txt
When does this email send?

  • When an Order is changed it’s status, example an Order changed status from Awaiting check to Payment accepted, if this Order have at least one Virtual Product, a “download_product” email will be sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php

5. Email template: bankwire.html, bankwire.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Awaiting bank wire payment, a “bankwite” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

email-template-5

6. Email template: cashondelivery.html, cashondelivery.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Awaiting Cash On Delivery validation, a “cashondelivery” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

7. Email template: cheque.html, cheque.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Awaiting check payment, a “cheque” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

8. Email template: order_canceled.html, order_canceled.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Canceled, a “order_canceled” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

9. Email template: outofstock.html, outofstock.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Awaiting bank wire payment, a “outofstock” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

10. Email template: payment.html, payment.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Payment accepted or Remote payment accepted, a “payment” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

11. Email template: payment_error.html, payment_error.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Payment error, a “payment_error” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

12. Email template: preparation.html, preparation.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Processing in progress, a “preparation” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

13. Email template: refund.html, refund.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Refunded, a “refund” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

14. Email template: shipped.html, shipped.txt

When does this email send?

  • After an Order added/updated it’s Status or Quantity of Product in Order, if the status is Shipped, a “shipped” email will sent.

What is PHP file execute this function?

  • PHP file: classes\order\OrderHistory.php
  • Method: sendEmail, line if (!Mail::Send((int) $order->id_lang, $result[‘template’],$topic…

15. Email template: voucher.html, voucher.txt

When does this email send?

1st Case: After a New Order is created (completed to Checkout steps) If:

  • This Order is not multi-shipping
  • And the value of the voucher is greater than the total of the order
  • And partial use is allowed
  • And this is an “amount” reduction, not a reduction in % or a gift

Then The voucher is cloned with a new value corresponding to the remainder. For an example: you have a coupon code is “ABC123” that have amount $300, but your new order have amount is $210, the Prestashop will apply “pres123” coupon for this Order (now your order amount is $0 = Free), then it create a New coupon code  “XYZ867” with remain amount: $300 – $210 = $90 and send this New coupon to you -> a “voucher” email will sent.

2nd Case: When an Order is refunded, a voucher will be refunded too -> a “voucher” email will sent.

What is PHP file execute this function?

  • classes\PaymentModule.php
  • controllers\admin\AdminOrdersController.php

16. Email template: order_conf.html, order_conf.txt

When does this email send?

  • After an Order is created, an “order_conf” email will sent to customer.

What is PHP file execute this function?

  • PHP file: classes\PaymentModule.php

17. Email template: log_alert.html, log_alert.txt

When does this email send?

  • If the minimal severity level has been reached (example someone try to logged in admin account many times…, a “log_alert” email sent to the shop owner.

What is PHP file execute this function?

  • PHP file: classes\PrestaShopLogger.php

18. Email template: forward_msg.html, forward_msg.txt

When does this email send?

email-template-6

  • Step 2: Click Forward this discussion to another employee, choose an employer, click  Forward button, an “forward_msg” email will be sent.

email-template-7

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminCustomerThreadsController.php

19. Email template: reply_msg.html, reply_msg.txt

When does this email send?

  • Go to Prestashop Backoffice > Customer Service, click View a Message (there messages are stored when a customer submit Contact form in your Prestashop website, read more: Contact page in Prestashop website?)

email-template-6

  • In Your answer to John DOE area, enter a your message to customer and click Send button

email-template-8

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminCustomerThreadsController.php

20. Email template: import.html, import.txt

When does this email send?

  • When you have any errors while importing a categories, products… from Prestashop Importer, a “import” email will sent.

email-template-10

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminImportController.php

21. Email template: password_query.html, password_query.txt

When does this email send?

  • Go to your Prestashop website, click Sign in to go to Sign in/ Sign up form, then click Forgot your password link. After you enter your email into Forgot your password form, click Send Reset link, a “password_query” email will sent.

email-template-11

  • When click “Forgot Password” in Admin form for log in to backoffice

What is PHP file execute this function?

  • controllers\admin\AdminLoginController.php
  • controllers\front\PasswordController.php

22. Email template: password.html, password.txt

When does this email send?

  • When you receive a “password_query” email (read 21th email template at above), Customer click on Confirm Password link in email

email-template-12

  • Then, it redirect to a Reset your password form, enter your New password, click Change Password button. a “password” email will sent.

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminLoginController.php

23. Email template: order_merchant_comment.html, order_merchant_comment.txt

When does this email send?

  • Go to Backoffice, click view an Order Detail, send a Message to customer, a “order_merchant_comment” email will sent.

email-template-14

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminOrdersController.php

24. Email template: credit_slip.html, credit_slip.txt

When does this email send?

  • Go to Backoffice, click view an Order Detail, click Partial refund. When an Order is refunded, a “credit_slip” email will sent.

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminOrdersController.php

25. Email template: backoffice_order.html, backoffice_order.txt

When does this email send?

  • When a new Order is created with status is “On backorder (not paid)”, a “backoffice_order” email will sent.

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminOrdersController.php

26. Email template: order_return_state.html, order_return_state.txt

When does this email send?

Step 1: Go to Backoffice > Customer Service > Merchandise Returns, Click view an Order

email-template-16

Step 2: Change Status and click Save

email-template-17

An “order_return_state” email will sent.

What is PHP file execute this function?

  • PHP file: controllers\admin\AdminReturnController.php

27. Email template: order_customer_comment.html, order_customer_comment.txt

When does this email send?

  • In Frontend, logged in and go to your Order History & Detail
  • Click to view detail an Order
  • Scroll to bottom, you can add a message to admin from “Add a Message” form

email-template-18

An “order_customer_comment” email will sent.

What is PHP file execute this function?

  • PHP file: controllers\front\OrderDetailController.php

28. Email template: contact.html, contact_form.html

When does this email send?

  • When a customer submit a Contact form in Prestashop website, a “contact_form” email will send to this customer for confirmation.
  • Also a “contact” email will send to Shop owner at the same time.
  • Read more: Contact page in Prestashop website?

What is PHP file execute this function?

  • PHP file: modules\contactform\contactform.php

29. Email template: newsletter_verif.html, newsletter_voucher.html, newsletter_conf.html

When does this email send?

Step 1: Someone subscribed an email in Prestashop website

email-template-19

Step 2: An newsletter_verif.html email will send to user to confirm that: You are subscribed form yourself. Then user click a Verify Link in this email to confirmation.

Step 3:  2 emails of newsletter_voucher.html, newsletter_conf.html will send to user at the same time

What is PHP file execute this function?

  • PHP file: modules\ps_emailsubscription\ps_emailsubscription.php

30. Email template: productoutofstock.html, productoutofstock.txt

When does this email send?

When you update a quantity of product, or change quantity in Stock Manager, if quantity < specified minimum number, also a “productoutofstock” email will send to Shop owner

What is PHP file execute this function?

  • PHP file: src\Core\Stock\StockManager.php

31. Email template: order_conf_product_list.html, order_conf_product_list.txt

When does this email send?

This email template display a product list table in order_conf email when a new order created.

  • order_conf_product_list.txt is used for {products_txt} variable
  • order_conf_product_list.html is used fo {products} variable

What is PHP file execute this function?

PHP file: classes\PaymentModule.php

  • Line 1: $product_list_txt = $this->getEmailTemplateContent(‘order_conf_product_list.txt’, Mail::TYPE_TEXT, $product_var_tpl_list);
  • Line 2: $product_list_html = $this->getEmailTemplateContent(‘order_conf_product_list.tpl’,

32. Email template: order_conf_cart_rules.html, order_conf_cart_rules.txt

When does this email send?

This email template display a voucher list in order_conf email when a new order created.

  • order_conf_cart_rules.txt is used for {discounts_txt} variable
  • order_conf_cart_rules.html is used fo {discounts} variable

What is PHP file execute this function?

PHP file: classes\PaymentModule.php

  • Line 1: $cart_rules_list_txt = $this->getEmailTemplateContent(‘order_conf_cart_rules.txt’, Mail::TYPE_TEXT, $cart_rules_list);
  • Line 2: $cart_rules_list_html = $this->getEmailTemplateContent(‘order_conf_cart_rules.tpl’, Mail::TYPE_HTML, $cart_rules_list);

Related Articles

1 Comment

  1. Magery May 17, 2019 at 3:45 pm

    Thank you for detailed list of emails.
    If you want to disable any email notification in PrestaShop you can check out our module DISABLE EMAIL NOTIFICATIONS FOR PRESTASHOP

Leave a reply

You must be logged in to post a comment.