调用非对象上的成员函数getCollection()以在magento中加载模型

时间:2018-07-14 11:42:13

标签: php magento magento-1.7

我在加载存储模块的Magento中遇到错误。

/** @var $websiteCollection Mage_Core_Model_Store */
$storeCollection = Mage::getModel('core/store')->getCollection()
    ->initCache($this->getCache(), 'app', array(Mage_Core_Model_Store::CACHE_TAG))
    ->setLoadDefault(true);

我得到了。

  

致命错误:在第20379行的/var/www/html/includes/src/__default.php中的非对象上调用成员函数getCollection()

当我尝试调用模块时,它返回false。

var_dump(get_class(Mage::getModel('core/store')));exit;

如何解决?

0 个答案:

没有答案