I'm stuck on an issue with displaying the payment method details in the email that is sent to client on new orders, this is using a custom payment method that I created. What I have so far is; I have created a module with a block at app/code/local/PayOnDelivery/Block and in it a Info.php file with the following content:
class PayOnDelivery_Block_Info extends Mage_Payment_Block_Info
{
protected function _construct()
{
parent::_construct();
$this->setTemplate('payondelivery/info.phtml');
}
}
Secondly I have created a info.phtml in app/design/frontend/default/default/template/payondelivery.
I have also created Data.php at app/code/local/PayOnDelivery/Helper, the file is empty with just the class defininition in it (shouldn't need anything else).
class PayOnDelivery_Helper_Data extends Mage_Core_Helper_Abstract
{
}
Also I have the necessary PayOnDelivery.php in app/code/local/PayOnDelivery/Model, the file has the necessary functions for the info.phtml to use.
The content of the info.phtml get printed nicely on the page when printing the order confirmation and also on the order page when displaying the order afterwards. For some reason the same content does not get applied to the email that is sent as new order.
I'm using the default order_new.html template for emails but the {{var payment_html}} is ending up empty. Anyone got ideas of the cause? I'm using Magento 1.9...