Magento: Add Grand Total to New Order Transactional Email
1. Make a copy of Order.php from:
/app/code/core/Mage/Sales/Model/Order.php
to:
/app/code/local/Mage/Sales/Model/Order.php
Then added the bold line below around line 1319:
$mailer->setTemplateParams(array( 'order' => $this, 'billing' => $this->getBillingAddress(), 'payment_html' => $paymentBlockHtml, // Adds Grand Total to email 'total' => number_format($this->getGrandTotal(), 2) ) );
The additional line will format the Grand Total to two decimal places. We were working on a single currency store, so we hard coded the currency symbol.
2. Add the ‘total’ variable to your Transactional Email template:
£{{var total}}