0

I want to add new method Mage_Eav_Model_Form, so I want to extend it. Doing as it suppose to be, but extension simply not working. Here is my part from config:

<models>
<vendor_mymodule>
    <class>Vendor_Mymodule_Model</class>
    <resourceModel>tw_subscriptionheader_resource</resourceModel>
</vendor_mymodule>
<vendor_mymodule_resource>
    <class>Vendor_Mymodule_Model_Resource</class>
</vendor_mymodule_resource>
<eav>
    <rewrite>
        <form>Venor_Mymodule_Model_Eav_Form</form>
    </rewrite>
</eav>

Here is original model:

abstract class Mage_Eav_Model_Form

And mine:

class Vendor_Mymodule_Model_Eav_Form extends Mage_Eav_Model_Form

For example I want to add:

public function something() {}  
0

Your rewrite is not correct, plus you should put the 'core' folder with the 'Model' folder

In config.xml

<global>
    <models>
        <core>
            <rewrite>
                <domainpolicy>Me_Mymodule_Model_Core_Domainpolicy</domainpolicy>
            </rewrite>
        </core>

Path

 app/code/local/Me/Mymodule/Model/Core/Domainpolicy.php

Class

 class Me_Mymodule_Model_Core_Domainpolicy extends Mage_Core_Model_Domainpolicy

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.