How to Rewrite a Model Already Rewritten in Magento

modeloverrides

I've read about ten different places (mostly answers on Magento stack exchange) about how to rewrite a model that has already been rewritten, but can't get my module to work. I've used the "Modules conflict detector" extension to try to debug the problem, with no success.

So my module rewrites a model from another module, which rewrites a core model.

The relevant part of the other module's config.xml:
(file path /app/code/local/GoMage/Navigation/etc/config.xml)

<?xml version="1.0" encoding="utf-8"?>
<config>
  <modules>
    <GoMage_Navigation>
      <version>3.2</version>
    </GoMage_Navigation>
  </modules>
  <global>
    <models>
      <catalog>
        <rewrite>
          <layer_filter_item>GoMage_Navigation_Model_Layer_Filter_Item</layer_filter_item>
        </rewrite>
      </catalog>
    </models>
  </global>
</config>

My config.xml:
(file path /app/code/local/OOTD/Navigation/etc/config.xml)

<?xml version="1.0" encoding="utf-8"?>
<config>
  <modules>
    <OOTD_Navigation>
      <version>0.1</version>
    </OOTD_Navigation>
  </modules>
  <global>
     <models>
        <catalog>
          <rewrite>
            <layer_filter_item>OOTD_Navigation_Model_Layer_Filter_Item</layer_filter_item>
          </rewrite>
        </catalog>
     </models>
  </global>
</config>

/app/etc/modules/OOTD_Navigation.xml:

<?xml version="1.0" encoding="utf-8"?>
<config>
  <modules>
    <OOTD_Navigation>
      <active>true</active>
      <codepool>local</codepool>
      <depends>
        <GoMage_Navigation />
      </depends>
    </OOTD_Navigation>
  </modules>
</config>

/app/code/local/OOTD/Navigation/Model/Layer/Filter/Item.php:

class OOTD_Navigation_Model_Layer_Filter_Item extends GoMage_Navigation_Model_Layer_Filter_Item {
  // ...
}

I've tried so many things I don't know what to do anymore. If you need more information just ask. Thanks in advance.

Best Answer

codepool is case sensitive and should be codePool