我刚刚完成了我的一种自定义运输方法,它在主要方法中有多种方法。所以我想让“允许的方法”列表显示在管理部分。所以我在我的 system.xml 中得到了下面的块
<allowed_methods translate="label">
<label>Allowed Methods</label>
<frontend_type>multiselect</frontend_type>
<source_model>mycompany_shipping/carrier_somefolder_definitions_methods</source_model>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
<can_be_empty>1</can_be_empty>
</allowed_methods>
但是 Magento 找不到我的课程,因为它总是在“法师”而不是“本地”中查找,它只是抛出这个错误,
include(Mage/Mycompany/Shipping/Model/Carrier/Somefolder/Definitions/Methods.php):
failed to open stream: No such file or directory in /Development/trunk/lib/Varien/Autoload.php on line 93
但是我的班级在local/Mycompany/Shipping/Model/Carrier/Somefolder/Definitions/Methods.php
,班级名称是Mycompany_Shipping_Model_Carrier_Somefolder_Definitions_Methods
我想可能是我在我的 config.xml 中遗漏了一些东西,所以这是我的 config.xml
<global>
<models>
<mycompshipping>
<class>Mycompany_Shipping_Model</class>
</mycompshipping>
</models>
<resources>
<mycompshipping_setup>
<setup>
<module>Mycompany_Shipping</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</mycompshipping_setup>
</resources>
</global>
<default>
<carriers>
<mycompanyrate>
<model>Mycompany_Shipping_Model_Carrier_Mycompanyrate</model>
</mycompanyrate>
</carriers>
</default>
任何想法为什么 Magento 找不到我的课程?