Jump to content

[TIP] Adding customer message in order alert email V1.1


Recommended Posts

Here is the way to add customer order message in order alert email with V1.1 (beta3)

Add in modules/mailalert/mailalerts.php

$sql = 'SELECT `message` FROM `'._DB_PREFIX_.'message` WHERE `id_order` = '.$order->id.' ORDER BY `id_message` desc LIMIT 1';
$result = Db::getInstance()->ExecuteS($sql);
$order_message = $result[0]['message'];



before

// Filling-in vars for mail

and

'{order_message}' => $order_message,



before

'{currency}' => $currency->sign);

and then

in modules/mailalerts/mails/en/new_order.html (do it with language email you need )

add

{order_message}



where you want to display the message on email.

you can also download the file

mailalerts.php

Link to comment
Share on other sites

×
×
  • Create New...