2013-02-20 76 views
0

在下載的模塊是有特定的呼叫Mage::getModel('module/statistic_collection'),這給了我的failed to open stream: No such file or directory誤差與路徑Namespace/Module/Model/Statistic/Collection.php但在Namespace/Module/Model/Mysql4/Statistic/Collection.php存在。
那麼我怎麼能告訴magento他們需要添加Mysql4文件夾?Magento的收集上Mysql4 =沒有這樣的文件或目錄

+1

嘗試從'法師改變它:: getModel( '模塊/ statistic_collection')''到法師:: getModel('模塊/統計') - > getCollection()' – Kalpesh 2013-02-20 19:16:40

回答

2

你有兩個選擇:

Mage::getResourceModel('module/statistics_collection') 

Mage::getModel('module/statistics')->getCollection() 
+0

好的非常感謝你...事實上,之前有Mage :: getResourceModel,但我讀了getModel + getCollection == getResourceModel,所以我將其替換,並得到這個錯誤...所以我的問題不是這樣,但我發現它是因爲你的提示:-) – Shadowbob 2013-02-21 09:59:55

相關問題