1

I need to modify the _beforeSave function of Mage_Customer_Model_Resource_Customer i created a new file in my module with the new method and put the rewrite in my config.xml

    <models>
        <customer_resource>
            <rewrite>
                <customer>Name_Module_Model_Resource_Customer</customer>
            </rewrite>
        </customer_resource>
    </models>

the new method works on the frontend (register page) but when I try to save a customer in admin it uses the core method what do I need to do to tell the admin about the rewrite?

0

I copied the method from the original class, this line parent::_beforeSave($customer); will call the original method. I replaced that line with

Mage_Eav_Model_Entity_Abstract::_beforeSave($customer); and it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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