Jump to content

1.4 Add customer message to email order confirmation


Pieter

Recommended Posts

Hi
 
Trying to get the customermessage in the email

 

added

'{order_message}' => Message::getMessagesByOrderId($order->id, false)

to classes\PaymentModule.php and put {order_message} in the mail template

 

mail states the word "Array" in stead of the message.

 

what am i missing?

 

thanks

 

prestashop 1.4

Link to comment
Share on other sites

thanks man, it helped!

 

output was

array(1) { [0]=> array(13) { ["id_message"]=> string(3) "763" ["id_cart"]=> string(6) "142088" ["id_customer"]=> string(1) "0" ["id_employee"]=> string(1) "0" ["id_order"]=> string(5) "14129" ["message"]=> string(10) "teststring" ["private"]=> string(1) "0" ["date_add"]=> string(19) "2014-09-11 10:09:29" ["cfirstname"]=> NULL ["clastname"]=> NULL ["efirstname"]=> NULL ["elastname"]=> NULL ["is_new_for_me"]=> string(1) "0" } }

 

so with at the start of send email to customer in classes\PaymentModule.php

 

$order_message = Message::getMessagesByOrderId($order->id, false);

 

and 

 

'{order_message}' => $order_message[0]['message'] in the list below

 

I was able to use {order_message} in the mailtemplate

 

regards,

pieter

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