产品页面上的 Magento 错误
Posted
技术标签:
【中文标题】产品页面上的 Magento 错误【英文标题】:Magento Error on Product Page 【发布时间】:2012-04-28 05:36:24 【问题描述】:我们的 Magento 产品页面收到此错误,但不知道原因:
a:5:i:0;s:178:"无效的方法 Mxperts_Jquery_Block_Page_html_Head::addExternalItem(Array ( [0] => external_js [1] => https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js ) )";i:1;s:2635:"#0 /home/partytim/public_html/app/code/community/CorlleteLab/Imagezoom/Block/Catalog/Product/View.php(38): Varien_Object->__call(' addExternalItem',数组) #1 /home/partytim/public_html/app/code/community/CorlleteLab/Imagezoom/Block/Catalog/Product/View.php(38): Mxperts_Jquery_Block_Page_Html_Head->addExternalItem('external_js', 'https://ajax.go. ..') #2 /home/partytim/public_html/app/code/core/Mage/Core/Block/Abstract.php(238): CorlleteLab_Imagezoom_Block_Catalog_Product_View->_prepareLayout() #3 /home/partytim/public_html/app/code/core/Mage/Core/Model/Layout.php(430): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout)) #4 /home/partytim/public_html/app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('catalog/product...', 'product.info') #5 /home/partytim/public_html/app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('catalog/product...', 'product.info') #6 /home/partytim/public_html/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element)) #7 /home/partytim/public_html/app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element)) #8 /home/partytim/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(345): Mage_Core_Model_Layout->generateBlocks() #9 /home/partytim/public_html/app/code/core/Mage/Cms/Helper/Page.php(112): Mage_Core_Controller_Varien_Action->generateLayoutBlocks() #10 /home/partytim/public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'no-route') #11 /home/partytim/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(75): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route') #12 /home/partytim/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Cms_IndexController->noRouteAction() #13 /home/partytim/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute') #14 /home/partytim/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #15 /home/partytim/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch() #16 /home/partytim/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array) #17 /home/partytim/public_html/index.php(80): Mage::run('', 'store') #18 main";s:3:"url";s:24:"/chili-pepper-beads.html";s:11:"script_name";s:10:"/index.php";s :4:"皮肤";s:7:"默认";
所有其他页面似乎都正确显示(产品网格、结帐、cms 页面等)
知道会发生什么吗?
谢谢!
【问题讨论】:
在 Mxperts_Jquery_Block_Page_Html_Head 中使用 addExternalItem 函数发生错误。您应该查看该函数,看看它可能有什么错误。 【参考方案1】:您正在尝试使用 addExternalItem 函数通过外部链接包含 jquery.min.js,但由于某种原因该函数失败。您可以尝试在本地托管 jquery 文件并将其包含在 page.xml 中
【讨论】:
以上是关于产品页面上的 Magento 错误的主要内容,如果未能解决你的问题,请参考以下文章
产品详细信息页面上的价格更改为 0.00 magento 2.4.3-p1