Pieter Posted September 10, 2014 Share Posted September 10, 2014 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 More sharing options...
Eolia Posted September 10, 2014 Share Posted September 10, 2014 try this and look the result: die(var_dump(Message::getMessagesByOrderId($order->id, false))); Link to comment Share on other sites More sharing options...
Pieter Posted September 11, 2014 Author Share Posted September 11, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now