I've loaded New Order transactional email to insert a custom block. I inserted it under the order items table layout handle call, and try to pass it $order
variable.
{{layout handle="sales_email_order_items" order=$order}}
...
{{block type="mymodule/sales_order_email_description" order=$order}}
In Mymodule_Block_Sales_Order_Email_Description class I wrote:
protected function _construct() {
$this->setTemplate('email/order/description.phtml');
}
And finally in description.phtml I try to access order:
$order = $this->getOrder();
...
$order->getId()
At this point, exception rise:
Fatal error: Call to a member function getId() on a non-object ... ...
I followed several tutorials, like this magento email templates but I'm still stuck with this fatal error.
Any ideas?