0

Let's say I wan't to override a community module named Aaa_Aaa with local module named Zzz_Zzz. It seems that no matter what I do, my local module loads after the community one, so the community module is matched first. I tried this:

<frontend>
    <routers>
        <aaa_aaa>
            <args>
                <modules>
                    <zzz_zzz before="Aaa_aa">Zzz_Zzz</zzz_zzz>
                </modules>
            </args>
        </aaa_aaa>
    </routers>
</frontend> 

app/code/local/Zzz/Zzz/controllers/IndexController.php

<?php

require_once Mage::getModuleDir('controllers','Aaa_Aaa') . DS . 'IndexController.php';

class Zzz_Zzz_IndexController extends Aaa_Aaa_IndexController
{
    public function indexAction()
    {
        //doesn't get to this
    }
}

app/etc/modules/Zzz_Zzz.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Zzz_Zzz>
            <active>true</active>
            <codePool>local</codePool>
        </Zzz_Zzz>
        <Aaa_Aaa>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Zzz_Zzz />
            </depends>
        </Aaa_Aaa>
    </modules>
</config>
1
  • please clear cache & check complier is enable or not
    – Amit Bera
    Aug 18, 2015 at 11:56

1 Answer 1

2

Change app/etc/modules/Zzz_Zzz.xml as below :

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Zzz_Zzz>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Aaa_Aaa />
            </depends>
        </Zzz_Zzz>
    </modules>
</config>
1
  • Tried it already, doesn't work.
    – LDusan
    Aug 18, 2015 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.