How to disable admin notification popup window in Magento?

In Magento when you log in to admin, many times you would have seen a pop up window with messages like a new magento version is available, a security fix is available etc. These are the notification message from Magento webiste.

You can view all these messages received in admin by going to Admin >> System >> Notifications; the popup displays the latest message received.

Magento Admin Notification Popup

To disable these admin notification messages follow the following steps:

  1. Login to your Magento Admin Panel
  2. Go to System >> Configuration >> Advanced
  3. Disable the Mage_AdminNotification module

 

The file “\app\design\adminhtml\default\default\layout\main.xml” defines the layout handle “notifications” as below:


<block type="core/text_list" name="notifications" as="notifications">

The file “\app\design\adminhtml\default\default\layout\adminnotification.xml” updates the layout handle “notifications”

The block of code below is responsible for displaying the notifications below the Menu


<reference name="notifications">

<block type="adminhtml/notification_toolbar" name="notification_toolbar" as="notification_toolbar" acl="system/adminnotification/show_toolbar" template="notification/toolbar.phtml" />

</reference>

This toolbar block code can be found at \code\core\Mage\Adminhtml\Block\Notification\Toolbar.php

This file has a function “isShow()” with the following check:


if (!$this->isOutputEnabled('Mage_AdminNotification')) {

return false;

}

So if we disable “Mage_AdminNotification” module in admin, the toolbar will not display.

 

The block of code below is responsible for displaying the notifications in popup window


<reference name="notifications">

<block type="adminhtml/notification_window" name="notification_window" as="notification_window" acl="system/adminnotification/show_toolbar" template="notification/window.phtml" />

This toolbar block code can be found at \code\core\Mage\Adminhtml\Block\Notification\Window.php

This file has a function canShow() with the following check


if (!$this->isOutputEnabled('Mage_AdminNotification')) {

$this->_available = false;

return false;

}

So if we disable “Mage_AdminNotification” module in admin, the popup will not display.

 

The “notification” handle is also used to display the notifications for indexing and caching as can be seen at:

File: \app\design\adminhtml\default\default\layout\main.xml [Line 120-125]


<block type="core/text_list" name="notifications" as="notifications">

<block type="adminhtml/notification_baseurl" name="notification_baseurl" as="notification_baseurl" template="notification/baseurl.phtml"></block>

<block type="adminhtml/cache_notifications" name="cache_notifications" template="system/cache/notifications.phtml"></block>

<block type="adminhtml/notification_survey" name="notification_survey" template="notification/survey.phtml"/>

<block type="adminhtml/notification_security" name="notification_security" as="notification_security" template="notification/security.phtml"></block>

</block>

File: \app\design\adminhtml\default\default\layout\index.xml [Line 30-32]


<reference name="notifications">

<block type="index/adminhtml_notifications" name="index_notifications" template="index/notifications.phtml"></block>

</reference>

In Magento Enterprise Edition, License module also updates the layout handle “notifications” in the fileĀ \app\design\adminhtml\default\default\layout\enterprise\license.xml


<reference name="notifications">

<block type="enterprise_license/adminhtml_checker" name="license_checker" as="license_checker" template="enterprise/license/checker/reminder.phtml"></block>

</reference>

 

You can use the “notification” layout handle in a similar way to display your custom module notifications.

 

In case you want to disable notifications for a particular role then go to Admin >> System >> Permissions >> Roles, select the role from the list for which you want to disable notification. Now select the “Role Resources” tab, uncheck the “Notifications” branch in the “Resources” tree and save the role.

Magento Role Resources

Leave a Comment

Back to top