Gordova
Gordova

Reputation: 347

Disable popup message in Magento 2.0

I am designing my own theme in Magento for the first time (without any base theme).

By default Magento loads a popup message that says "Checkout out as a new customer Creating an account has many benefits:...".

The question: How can I disable this message?

I know I can hide it using CSS, but I would like to remove it from the HTML code.

Thanks!

Upvotes: 3

Views: 6062

Answers (2)

Hiten Dobariya
Hiten Dobariya

Reputation: 1

To remove this notification popup message.

Login to your Magento Admin Panel Go to System >> Configuration >> Advanced Disable the Mage_Admin Notification module

Upvotes: 0

Gordova
Gordova

Reputation: 347

Create this file (copy from Magento):

<vendor_name>/<theme_name>/Magento_Customer/layout.xml

And replace:

<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>

With:

<referenceBlock name="authentication-popup" remove="true"/>

Upvotes: 3

Related Questions