0

I am creating a custom module to override a method buildCustomer() in file app/code/community/Ess/M2ePro/Model/Magento/Customer.php of Magento 1 module Ess_M2ePro but seem not working. Can you check please below in detail, what I have so far.

app/etc/modules/myNamespace_M2eProFixPassword.xml

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

app/code/local/myNamespace/M2eProFixPassword/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <myNamespace_M2eProFixPassword>
            <version>1.0</version>
        </myNamespace_M2eProFixPassword>
    </modules>
    <global>
        <models>
            <M2eProFixPassword>
                <class>myNamespace_M2eProFixPassword_Model</class>
            </M2eProFixPassword>        
            <M2ePro>
                <rewrite>
                    <magento_customer>myNamespace_M2eProFixPassword_Model_Customer</magento_customer>
                </rewrite>
            </M2ePro>
        </models>
    </global>
</config>

app/code/local/myNamespace/M2eProFixPassword/Model/Customer.php

class myNamespace_M2eProFixPassword_Model_Magento_Customer extends Ess_M2ePro_Model_Magento_Customer
{
    public function buildCustomer()
    {
        code here
    }
}

This is the community module config.xml file of Ess_M2ePro

app/code/community/Ess/M2ePro/etc/config.xml

<config>
    <global>
        <models>
            <M2ePro>
                <class>Ess_M2ePro_Model</class>
                <resourceModel>M2ePro_resource</resourceModel>
            </M2ePro>
        </models>
    </config>
</global>

Your Answer

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

Browse other questions tagged or ask your own question.