4
votes

I'm trying to extend the class of a third party Magento extension.

My module xml:

within config>modules> tags

<EDPA_MegaNavigation>

        <active>true</active>

        <codePool>local</codePool>

        <depends>
            <Infortis_UltraMegamenu />
        </depends>

    </EDPA_MegaNavigation>

My Config xml:

within config>global>blocks> tags

 <ultramegamenu>

       <rewrite>

           <Infortis_UltraMegamenu_Block_Navigation>EDPA_MegaNavigation_Block_Navigation</Infortis_UltraMegamenu_Block_Navigation>

       </rewrite>

   </ultramegamenu>

My extended class (Navigation.php) has

class EDPA_MegaNavigation_Block_Navigation extends Infortis_UltraMegamenu_Block_Navigation
{
########
}

Within system>configuration>advanced EDPA_MegaNavigation is listed and shows as enabled.

My target navigation.php within Infortis>UltraMegamenu>Block is not being rewritten.

Any help/guidance much appreciated.

2
put Infortis>UltraMegamenu >etc>config.xml for worksAmit Bera
in which codepool your ultramegamenu module is located? in local or community?MeenakshiSundaram R
local codepool - but please check Amit Bera's answer as this got my extension working.strawbicus

2 Answers

4
votes

Here the issue in if Infortis_UltraMegamenu module block tag is ultramegamenu then

<ultramegamenu>

       <rewrite>

           <navigation>EDPA_MegaNavigation_Block_Navigation</navigation>

       </rewrite>

   </ultramegamenu>
0
votes

Your <rewrite> doesn't look to be set up properly, it's supposed to reference another config node and not a direct class name. Check the UltraMegamenu's config.xml to get the node from it.

e.g. If UltraMegamenu is set up like:

<blocks>
    <ultramegamenu>
        <class>Infortis_UltraMegamenu_Block_Navigation</class>
    </ultramegamenu>
</blocks>

Then your rewrite child node would be "ultramegamenu" instead of the class name.