Unable to override base model in Magento

I am trying to override Mage_Catalog_Model_Layer_Filter_Category. In system.log Im gets a warning:

Warning: include (Mycomp_Catalog_Model_Layer_Filter_Category.php): stream could not be opened: there is no such file or directory in / var / www / magento / includes / src / Varien _Autoload.php on line 93 Warning: include (): Could not open "Mycomp_Catalog_Model_Layer_Filter. php "to include (include_path = / var / www / magento / includes / src:.: / Usr / share / php: / usr / share / pear) in / var / www / magento / includes / src / Varien _Autoload.php in line 93

What am I doing wrong?

Mycomp / Catalog / etc / config.xml:

<?xml version="1.0"?>
<config>
<modules>
    <Mycomp_Catalog>
        <version>0.1.0</version>
    </Mycomp_Catalog>
</modules>
<global>
    <models>
        <catalog>
            <rewrite>                    
                <layer_filter_category>Mycomp_Catalog_Model_Layer_Filter_Category</layer_filter_category>
            </rewrite>
        </catalog>
    </models>
</global>

Mycomp / Catalog / Model / Layer / Filter / Category.php:

class Mycomp_Catalog_Model_Layer_Filter_Category extends  Mage_Catalog_Model_Layer_Filter_Category
{

} 

application / etc / modules / Mycomp_All.xml:

<?xml version="1.0"?>
<config>
  <modules>
     <Mycomp_Catalog>
       <codePool>local</codePool>
       <active>true</active>
     </Mycomp_Catalog>
  </modules>
 </config> 
+3
2

. ( , 1.4 CE). , , , , , , .

http://alanstorm.com/testbed/Mycomp.tar.gz

+2

, Mycomp_Catalog? :

<global>
    <models>
        <catalog>
            <rewrite>                    
                <layer_filter_category>Mycomp_Catalog_Model_Layer_Filter_Category</layer_filter_category>
            </rewrite>
        </catalog>
        <mycompcatalog>
            <class>Mycomp_Catalog_Model</class>
        </mycompcatalog>
    </models>
</global>

. , !

,

+4

Source: https://habr.com/ru/post/1754984/


All Articles