Magento – Showing payment details on any email template

email-templatesmagento-1

I have made a test putting the var {{var payment_html}} inside the email template order_update.html however when Magento sends an email using this template, any payment information is printed on the box "Payment Details". After that, I searched about it and I found out on this link that some variables don't make effect for some templates. I would like to know if is possible to show off the payment details on the order update email template.

Does anybody have idea about how to do that?

Best Answer

Var $payment_html is injected in email variables in Mage_Sales_Model_Order::sendNewOrderEmail() and not available for update emails. Since exact block wich is rendered depends on payment method you will need to get that HTML using same way as in Mage_Sales_Model_Order::sendNewOrderEmail(). You can either extend and overwrite Mage_Sales_Model_Order::sendNewOrderEmail() or create your own block and reference it in the email template.

{{block type="your/block_type"}}

The only problem is how to pass order to your block. I am not sure if var order will work in this context.