Home » Magento » Magento Customization: How to set additional data in order email template

Magento Customization: How to set additional data in order email template

1) Place your html code in given file template file:
app/locale/template/email/sales/order_new.html
Example Code.:

Ship Date:
{{var delivery_date}}

2) Set your additional data in given class Mage_Sales_Model_Order(Note: As this is a very specific requirement so core file is modified you can use this trick and work from local folder as well)
Find these function sendNewOrderEmail() in line number.:1241
Prepare your data in array
Finally assign your array into mailer function
$mailer->setTemplateParams(array(
‘order’        => $this,
‘billing’      => $this->getBillingAddress(),
‘payment_html’ => $paymentBlockHtml,
‘delivery_date’ => “Your array goes here”
)