在自定义Magento模块中加载模型时出错

时间:2011-12-28 16:22:04

标签: magento

这是错误:

Warning: include(Mage/Bitstream/Model/Selfawb.php): failed to open stream: No such file or directory

我的完整config.xml

<config>
<modules>
    <Bitstream_Selfawb>
        <version>0.1.0</version>
        <depends>
            <Mage_Shipping />
        </depends>
    </Bitstream_Selfawb>
</modules>

<global>
    <models>
        <selfawb>
            <class>Bitstream_Selfawb_Model</class>
        </selfawb>
    </models>
    <helpers>
        <selfawb>
            <class>Bitstream_Selfawb_Helper</class>
        </selfawb>
    </helpers>
    <resources>
        <selfawb_setup>
            <setup>
                <module>Bitstream_Selfawb</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </selfawb_setup>
        <selfawb_write>
            <use>core_write</use>
        </selfawb_write>
        <selfawb_read>
            <use>core_read</use>
        </selfawb_read>            
    </resources>
</global>

<default>
    <carriers>
        <selfawb>
            <model>bitstream/Selfawb</model>
        </selfawb>
    </carriers>
</default>

谁能告诉我我做错了什么?我只是想不出来。

1 个答案:

答案 0 :(得分:4)

您的运营商型号的班级组不正确。如果您将“bitstream / Selfawb”作为default/carriers/selfawb的值,则global/models下的类组必须是“比特流”而不是“自我”。