Third party helper override doesn't work

1.5k views Asked by At

I am writing an extension for Magento 1.7 where I need to override a helper from an third party extension.

  • The name of my extension is Mkpreis_Ebay
  • Name of the third party extension: Ess_M2ePro
  • Helper I want to override: Ess_M2ePro_Helper_Module_Renderer_Description

My config.xml

<config>
<modules>
    <Mkpreis_Ebay>
      <version>0.0.1</version>
    </Mkpreis_Ebay>
</modules>
<global>
    <helpers>
        <ebay>
            <class>Mkpreis_Ebay_Helper</class>
        </ebay>
        <M2ePro>
            <rewrite>
                <module_renderer_description>Mkpreis_Ebay_Helper_Module_Renderer_Description</module_renderer_description>
            </rewrite>
        </M2ePro>
    </helpers>
</global>
</config>

Part of the Content of the 3rd party extension config.cml

...
<modules>
    <Ess_M2ePro>
        <version>6.2.2</version>
    </Ess_M2ePro>
</modules>
...
<global>
...
    <helpers>
        <M2ePro>
            <class>Ess_M2ePro_Helper</class>
        </M2ePro>
    </helpers>
</global>
...

Content of Mkpreis_Ebay.xml

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

Folder Structure

Mkpreis
 Ebay
  etc
   config.xml
  Helper
   Module
    Renderer
     Description.php
   Data.php

My only problem is that it does not override the class! My extension is recognised and active. If I put smt inside my Data.php the code is executed and working - the class does not get overwritten.

1

There are 1 answers

1
Joseph McDermott On BEST ANSWER

What you've written looks correct... is something else rewriting it perhaps? Add a _construct() method to Ess_M2ePro_Helper_Module_Renderer_Description with die(get_class($this)); and see what the class name is. If it is something else, you have some more work to do (which I can help with if need be), otherwise if it is Ess_M2ePro_Helper_Module_Renderer_Description then I would painstakingly check all of your file names, config, etc. for uppercase/lowercase mistakes.