1

I am trying to override a function in Mage/Core/Model/Email/Template/Filter.php the module i wrote is just a config that looks like this

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_Module>
            <version>0.1.0</version>
        </Namespace_Module> 
    </modules>
    <global>
        <models>
            <module>
                <rewrite>
                    <email_template_filter>Namespace_Module_Model_Email_Template_Filter</email_template_filter>
                </rewrite>
            </module>
       </models>
    </global>
</config>

in Namespace/Module/Mage/Core/Model/Email/Template/Filter.php I have

<?php
class Namespace_Module_Model_Email_Template_Filter extends Mage_Core_Model_Email_Template_Filter
{...
    public function varDirective($construction)
    {

why is this not working?

1 Answer 1

1

I have done small mistake <module> should be <core>

Change from

 <global>
        <models>
            <module>
                <rewrite>
                    <email_template_filter>Namespace_Module_Model_Email_Template_Filter</email_template_filter>
                </rewrite>
            </module>
       </models>
    </global>

to

<global>
        <models>
            <core>
                <rewrite>
                    <email_template_filter>Namespace_Module_Model_Email_Template_Filter</email_template_filter>
                </rewrite>
            </core>
       </models>
    </global>
1
  • edited the for: should be part you can erase that from answer Commented Feb 15, 2016 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.