0
我得到的错误升级后:Magento的:缺少集合Mage_Catalog_Block_Product_List_Toolbar从1.3升级后toolbar.phtml 1.7
Fatal error: Call to a member function getSize() on a non-object in ./app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml on line 34
出错行:<?php if($this->getCollection()->getSize()): ?>
一些快速的调试,我发现getCollection后返回null。作为解决方案,我手动设置集合:
$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('*');
$this->setCollection($collection);
我的问题,为什么不是集合被设置?它通常会在哪里设置?
我已经定制了一些核心文件,并完全忘记它,这是其中之一,谢谢! – PieSub