0

我是一名 magento 开发人员,遇到了一个问题。
当我在主页上名为“ Search entire store”的搜索框中键入任何产品时,问题出在目录搜索中。它给了我“ There has been an error processing your request”,并出现以下错误

a:5:{i:0;s:94:"Invalid method Mage_Catalog_Block_Layer_Filter_Category::shouldDisplayProductCount(Array
(
)
)";i:1;s:4501:"#0 /home/furqan/projects/nashuatech-new/development/code/app/design/frontend/default/a015/template/catalog/layer/filter.phtml(42): Varien_Object->__call('shouldDisplayPr...', Array)
#1 /home/furqan/projects/nashuatech-new/development/code/app/design/frontend/default/a015/template/catalog/layer/filter.phtml(42): Mage_Catalog_Block_Layer_Filter_Category->shouldDisplayProductCount()
#2 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(241): include('/home/furqan/pr...')
#3 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#4 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(136): Mage_Core_Block_Template->_toHtml()
#6 /home/furqan/projects/nashuatech-new/development/code/app/design/frontend/default/a015/template/catalog/layer/view.phtml(51): Mage_Catalog_Block_Layer_Filter_Abstract->getHtml()
#7 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(241): include('/home/furqan/pr...')
#8 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#9 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#10 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#11 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#12 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#13 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#14 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#15 /home/furqan/projects/nashuatech-new/development/code/app/design/frontend/default/a015/template/page/3columns.phtml(26): Mage_Core_Block_Abstract->getChildHtml('left')
#16 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(241): include('/home/furqan/pr...')
#17 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#18 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#19 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#20 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#21 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#22 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/CatalogSearch/controllers/ResultController.php(80): Mage_Core_Controller_Varien_Action->renderLayout()
#23 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_CatalogSearch_ResultController->indexAction()
#24 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#25 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#26 /home/furqan/projects/nashuatech-new/development/code/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#27 /home/furqan/projects/nashuatech-new/development/code/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#28 /home/furqan/projects/nashuatech-new/development/code/index.php(80): Mage::run('', 'store')
#29 {main}";s:3:"url";s:32:"/index.php/catalogsearch/result/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

任何帮助将不胜感激 问候, Furqan Ahmed

4

1 回答 1

0

我的猜测是,您正在使用带有函数的主题来计算搜索结果,而该方法未定义,因此出现错误““Invalid method Mage_Catalog_Block_Layer_Filter_Category:: shouldDisplayProductCount

尝试默认主题,看看它是否有效。

于 2012-11-07T10:41:13.327 回答