Ovidiu
Ovidiu

Reputation: 2931

Error Loading A Model in a Custom Magento Module

Here is the error:

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

my full 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>

Can anyone tell me what am I doing wrong? I just can't figure it out.

Upvotes: 1

Views: 815

Answers (1)

benmarks
benmarks

Reputation: 23205

You have the incorrect class group for your carrier model. If you have "bitstream/Selfawb" as the value for default/carriers/selfawb, your class group under global/models would need to be "bitstream" instead of "selfawb".

Upvotes: 4

Related Questions