我第一次在 Magento 中设计自己的主题(没有任何基本主题)。
默认情况下,Magento 会加载一条弹出消息,上面写着“以新客户身份结帐创建帐户有很多好处:...”。
问题:如何禁用此消息?
我知道我可以使用 CSS 隐藏它,但我想从 HTML 代码中删除它。
谢谢!
我第一次在 Magento 中设计自己的主题(没有任何基本主题)。
默认情况下,Magento 会加载一条弹出消息,上面写着“以新客户身份结帐创建帐户有很多好处:...”。
问题:如何禁用此消息?
我知道我可以使用 CSS 隐藏它,但我想从 HTML 代码中删除它。
谢谢!
创建这个文件(从 Magento 复制):
<vendor_name>/<theme_name>/Magento_Customer/layout.xml
并替换:
<block class="Magento\Customer\Block\Account\AuthenticationPopup" name="authentication-popup" as="authentication-popup" template="account/authentication-popup.phtml">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="authenticationPopup" xsi:type="array">
<item name="component" xsi:type="string">Magento_Customer/js/view/authentication-popup</item>
<item name="children" xsi:type="array">
<item name="messages" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/view/messages</item>
<item name="displayArea" xsi:type="string">messages</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</block>
和:
<referenceBlock name="authentication-popup" remove="true"/>
删除此通知弹出消息。
登录到您的 Magento 管理面板 转到System >> Configuration >> Advanced
禁用Mage_Admin Notification
模块