This is how I call a custom phtml file in the trans.email content:
{{block type='core/template' area='frontend' template='foldername/myfile.phtml' order=$order}}
and its working perfect. But I want to include a block where I will do the logic and in the phtml file I just want to call the needed function from my block. I tried the following:
{{block type='mynamespace_mymodule/email_pdflink' area='frontend' template='foldername/myfile.phtml' order=$order}}
and this is the content of the block:
class Mynamespace_Mymodule_Block_Email_Pdflink extends Mage_Core_Block_Template
{
public function test()
{
return 13;
}
}
and the content of the myfile.phtml:
$this->test();
Even if a write a simple html code in the myfile.phtml file it doesn't show up in the content of my trans. email. Any idea how to solve this ? thx