Hello,
I am trying to insert the Order Message/Note into invoice.pdf in prestashop 1.6.0.14.
i have make a function stored in override/classes/order/OrderInvoice.php
I try to get the order message from my database with this class:
public static function getMessages($id_order)
{
$messages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT `message`
FROM `'._DB_PREFIX_.'message`
WHERE `id_order` = '.(int)$id_order.'
ORDER BY `id_message`
');
return nl2br(implode("\n", (array)$messages));
}
How can i make it appears in my invoice.tpl? i try with {$order_detail.messages} but this does not work. Can somebody help me?
Can someone describe me another way to appear the message in invoice.pdf?
Thanks!