I need to add a custom variable with my module in Mage_Core_Email_Template_Filter for to use in transactional email. I have tried:
config.xml
<core>
<rewrite>
<email_template_fitler>Mage_Core_Email_Template_Filter</email_template_fitler>
</rewrite>
</core>
Filter.php
<?php
class ITEP_Incomm_Model_Template_Filter extends Mage_Core_Email_Template_Filter
{
//variavel para obter código de validação
public function codeValidationDirective($construction) {
$params = $this->_getIncludeParameters($construction[2]);
return print_r('1142111e2e1we321123211');
}
}
and using with {{codeValidation}}, {{customVar code=codeValidation}} but in preview of template the result is the text {{codeValidation}} and not the real value.
Why i need to modify? thanks in advance. My cache is off, and clear.