Jump to content

send new_order.txt not new_order.html


PEJ33

Recommended Posts

I would like to get my email notification that someone has placed an order as a plain text email not an HTML email.

 

I can see that in Mail Alerts there is an HTML version of new_order and a .txt version as well.

 

How do I get prestashop to send me the .txt version?

Link to comment
Share on other sites

Sending emails using html, txt or both is a global configuration setting, so if you change the setting, it would effect all emails sent.

 

If you only want to effect one template, then you would need to alter the Mail.php class.  Below is the existing code from PS v1.5.4.1, it may be different in other PS versions.  You would need to revise this code to check which template is being used, and prevent the html Part

  if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT)
      $message->addPart($template_txt, 'text/plain');
  if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_HTML)
      $message->addPart($template_html, 'text/html');

 

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