0

I am using magento community version 1.9.2.1 the issue I am facing is that the Grand total block in the order confirmation email is not being displayed. Can anyone please help me out.. thanks in advance..

0

Go to

/app/code/core/Mage/Sales/Model/Order.php

Copy to

/app/code/local/Mage/Sales/Model/Order.php

Then add the new variables below line 1346:

$mailer->setTemplateParams(array(
'order' => $this,
'billing' => $this->getBillingAddress(),
'payment_html' => $paymentBlockHtml,
// Adds Subtotal to email (don't forget to add the comma above this line)
 'subtotal' => number_format($this->getSubtotal(), 2),
 // Adds Discount to email 
 'discount' => number_format($this->getDiscountAmount(), 2),
 // Adds Grand Total to email (don't forget to remove the comma at the end of this line)
 'total' => number_format($this->getGrandTotal(), 2)
)
);

The additional lines will format to two decimal places.

Add the variables to your Transactional Email template:

${{var subtotal}}
${{var discount}}
${{var total}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.