Jump to content

Email templates associated to products


Recommended Posts

Hi,

 

I need to send different email templates depending on the product that has been purchased. They should be sent automatically after purchase, in addition to those that are sent by default. I also need to define additional email addresses where each of these emails are sent. Is there a way to do it? Any idea highly appreciated.

 

Thanks in advance!

Link to comment
Share on other sites

Hi,

 

could you give some more info, some example of mail template? What difference in templates do you expect? What should determine those differences product ID, product category, manufacturer?

 

Hi,

 

I sell activities and events, not physical products, and there are some details about the activity that are provided to the costumer only after purchase (e.g. contact name, telephone number...), so differences in templates should be determined by product ID. Differences in templates would only affect text content.

 

As a provisional solution I will create downloadable products and include this "post-purchase information" in a downloadable PDF, but that's one more step and many clicks for customers, and I'd like to make the process easier for them.

 

Just as better as an automatic specific email template for each product (or even better, to avoid information duplication) could be to automatically email customers the same PDF that can be downloaded from their account. Is there a way to do so?

 

Thanks!

Link to comment
Share on other sites

Hi,

 

I haven't got ready solution, but I think you could go this way:

- add mentioned information (e.g. contact name, telephone number...) as product features

- make visible or hidden features on product page as you want

- change mail function in class PaymentModule.php which is responsible for preparation data and sending "order confirmation" e-mail

- change order_conf.html and order_conf.txt templates to display needed information

Link to comment
Share on other sites

Hi,

 

I haven't got ready solution, but I think you could go this way:

- add mentioned information (e.g. contact name, telephone number...) as product features

- make visible or hidden features on product page as you want

- change mail function in class PaymentModule.php which is responsible for preparation data and sending "order confirmation" e-mail

- change order_conf.html and order_conf.txt templates to display needed information

 

Thanks, sekbos! Is sounds good, and I think it could work for me. However, I'm not a programmer, and when I look at the code of PaymentModule.php, I just don't know which lines should I edit... Any suggestion?

Link to comment
Share on other sites

  • 4 years later...
  • 1 year later...

I'm in a similar situation and want to send one of many possible follow-up emails to customers after they purchase certain products. It is regarding maintenance/care of certain equipment and will drive them to my blog.

 

I don't think the above solution with the paymentmodule file would work for me, since I need to include multiple paragraphs of text, and make sure to only send one email, delay the email to send 8 days after purchase, and avoid sending a given email to the same customer again.

 

If no module is available that is made to do customer follow ups like this, I might be into hiring a developer to create it. Feel free to PM me.

Link to comment
Share on other sites

Hi,

 

I have made a module for this. Exactly like you are looking for. What you do is this:

  • Create a new module. See PRestashop module generator to get a ready to use module
  • In the install() function of your <modulename>.php. Add this hook: $this->registerHook('actionValidateOrder');
  • Then create in the same .php file a new function called: public function hookActionValidateOrder($params){};

 

This hook is triggered automatically after an order is submitted. If you do this: print_r($params); inside this action hook, you get a nice array with all the available options like customer email, order data, etc.

Then when this hook is triggered you can setup a mail function to send the mail in any template to any person you want.

:)  :)

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