我是Magento的初学者,我为品牌安装了新的Magento扩展程序。但我得到了错误 请帮帮我
my code is :
Invalid method Bc_Manufacturer_Block_Manufacturer::displayOnLeftSidebarBlock(Array
(
)
)
Trace:
#0 [internal function]: Varien_Object->__call('displayOnLeftSi...', Array)
#1 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Model\Layout.php(348): Bc_Manufacturer_Block_Manufacturer->displayOnLeftSidebarBlock()
#2 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Model\Layout.php(214): Mage_Core_Model_Layout->_generateAction(Array, Array)
#3 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Model\Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Model\Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Controller\Varien\Action.php(344): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 C:\xampp\htdocs\magento_new\app\code\core\Mage\Cms\Helper\Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#7 C:\xampp\htdocs\magento_new\app\code\core\Mage\Cms\Helper\Page.php(52): Mage_Cms_Helper_Page->_renderPage()
#8 C:\xampp\htdocs\magento_new\app\code\core\Mage\Cms\controllers\IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'furniture-jupit...')
#9 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Controller\Varien\Action.php(419): Mage_Cms_IndexController->indexAction(Object(Mage_Cms_IndexController), 'furniture-jupit...')
#10 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch()
#11 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match('index')
#12 C:\xampp\htdocs\magento_new\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch(Object(Mage_Core_Controller_Request_Http))
#13 C:\xampp\htdocs\magento_new\app\Mage.php(683): Mage_Core_Model_App->run()
#14 C:\xampp\htdocs\magento_new\index.php(87): Mage::run(Array)
#15 {main}
答案 0 :(得分:0)
在主页上添加此代码以显示产品并评论旧代码:
<?php echo $this->getLayout()->createBlock('manufacturer/manufacturer')->setProduct($_product)->setTemplate('manufacturer/product_manufacturer.phtml')->toHtml(); ?>