【发布时间】:2010-07-16 12:33:32
【问题描述】:
我正在尝试覆盖 Mage_Catalog_Model_Layer_Filter_Category。 在 system.log 我收到警告:
警告:包含(Mycomp_Catalog_Model_Layer_Filter_Category.php):无法打开流:第 93 行的 /var/www/magento/includes/src/Varien_Autoload.php 中没有此类文件或目录 警告:include():无法在 /var 中打开 'Mycomp_Catalog_Model_Layer_Filter_Category.php' 以包含 (include_path='/var/www/magento/includes/src:.:/usr/share/php:/usr/share/pear') /www/magento/includes/src/Varien_Autoload.php 第 93 行
我做错了什么?
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
{
}
app/etc/modules/Mycomp_All.xml:
<?xml version="1.0"?>
<config>
<modules>
<Mycomp_Catalog>
<codePool>local</codePool>
<active>true</active>
</Mycomp_Catalog>
</modules>
</config>
【问题讨论】:
标签: model magento overriding