Questions tagged «magento2.2.4»


4
Magento2:升级到2.2.4后,面包屑从产品页面消失
我将Magento升级到2.2.4,现在产品页面上没有面包屑。它们显示在其他页面上,而不显示在产品上。我检查了源并注意到有一个带有“ breadcrumbs”类和一些json参数的div,但是它是空的(控制台上没有错误)。 任何想法? 更新: 我发现由于某种原因我无法解释,Magento开始使用JS在顶部菜单导航的基础上构建产品页面的面包屑,因为我改变了菜单并使用了不同的CSS选择器,因此它停止了工作。 我相信现在我可以解决这个问题,但是我看不出他们有任何充分的理由这样做,这太脆弱了…… 我的临时解决方法(如果有帮助,...): 1.构建一个模块并添加一个扩展\ Magento \ Theme \ Block \ Html \ Breadcrumbs的块,以便添加方法getCrumbs()*不需要di.xml namespace Vendor\Module\Block\Html; class Breadcrumbs extends \Magento\Theme\Block\Html\Breadcrumbs { public function getCrumbs() { return $this->_crumbs; } public function getBaseUrl() { return $this->_storeManager->getStore()->getBaseUrl(); } } 2.覆盖产品页面上的面包屑模板(app / design / frontend / Vendor / Theme / Magento_Catalog …

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.