4

I would like to rewrite a model class which is in the community pool. I've looked for solution but I cannot managed to override a community module. Here's my module:

app/etc/Mycompany_Mymodule.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Mycompany_Mymodule>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Unirgy_Dropship/>
            </depends>
        </Mycompany_Mymodule>
    </modules>
</config>

Config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Mycompany_Mymodule>
            <version>0.1.0</version>
        </Mycompany_Mymodule>
    </modules>

    <global>
        <models>
            <unirgy_dropship>
                <rewrite>
                    <pdf_shipment>Mycompany_Mymodule_Model_Pdf_Shipment</pdf_shipment>
                </rewrite>
            </unirgy_dropship>
        </models>
    </global>
</config>

Could you tell me what I am doing wrong please ? thanks

5

just try with below tag in config.xml

you can see model path tag is different in unirgy drop ship module

 <models>
     <udropship>
            <rewrite>
                <pdf_shipment>Mycompany_Mymodule_Model_Pdf_Shipment</pdf_shipment>
            </rewrite>
     </udropship>
 </models>

i am sure it will work for you

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.