Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Disable all notifications
 
stinky
Jr. Member
 
Total Posts:  2
Joined:  2008-08-13
 

How do I disable all notifications? Especially the ones that pop-up in the dashboard.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
nostrzak
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2007-09-18
Wroclaw, Poland
 

If you want totaly disable notifications do as follow:

1) Remove from app/design/adminhtml/default/default/layout/main.xml two lines:

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

and

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

2) Change following code in app/etc/modules/Mage_All.xml

<Mage_AdminNotification>
            <
active>true</active>
            <
codePool>core</codePool>
            <
depends>
               <
Mage_Core />
            </
depends>
        </
Mage_AdminNotification>

into

<Mage_AdminNotification>
            <
active>false</active>
            <
codePool>core</codePool>
            <
depends>
               <
Mage_Core />
            </
depends>
        </
Mage_AdminNotification>
 
Magento Community Magento Community
Magento Community
Magento Community
 
groupthing
Member
 
Total Posts:  40
Joined:  2007-12-24
 

System >> Web Services >> Roles

You can create a custom role, rather than the omnipresent admin, that doesn’t have notifications rights. I think that’d do it as well.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MariusG
Jr. Member
 
Total Posts:  7
Joined:  2008-03-18
Romania
 

nostrzak, thanks a lot for your tip, it works great ! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
pauljg1
Sr. Member
 
Avatar
Total Posts:  179
Joined:  2008-02-22
 

nostrzak, thanks for posting really helpful

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andy Bala
Jr. Member
 
Total Posts:  11
Joined:  2009-02-02
 

Thank you nostrzak.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MachineRebel
Jr. Member
 
Total Posts:  8
Joined:  2007-12-28
 
groupthing - 25 January 2009 11:04 AM

System >> Web Services >> Roles

You can create a custom role, rather than the omnipresent admin, that doesn’t have notifications rights. I think that’d do it as well.

Last I checked, that will get rid of the “System -> Notifications” menu, but you’d still have to use the method above to get rid of the pop-up and the toolbar.

 
Magento Community Magento Community
Magento Community
Magento Community
 
i960
Guru
 
Avatar
Total Posts:  633
Joined:  2007-10-01
Bakersfield, CA
 
MachineRebel - 18 May 2009 07:05 AM

groupthing - 25 January 2009 11:04 AM
System >> Web Services >> Roles

You can create a custom role, rather than the omnipresent admin, that doesn’t have notifications rights. I think that’d do it as well.

Last I checked, that will get rid of the “System -> Notifications” menu, but you’d still have to use the method above to get rid of the pop-up and the toolbar.

This is true.  I tried setting it up so only I will receive the notifications and our sales guys won’t.  No dice.  It seems to be all or nothing.  I did notice the following code in /app/code/Mage/Adminhtml/Block/Notification/Window.php:

/**
     * Check if current block allowed in ACL
     *
     * @param string $resourcePath
     * @return bool
     */
    protected function _isAllowed()
    
{
        
if (!is_null($this->_aclResourcePath)) {
            
return Mage::getSingleton('admin/session')
                ->
isAllowed('admin/system/adminnotification/show_toolbar');
        
}
        
else {
            
return true;
        
}
    }

From following that and seeing where and how the _isAllowed() function is being used, it seems obvious that you should be able to disable the popup on a per user basis.  But it flat out doesn’t work, and I can’t figure out why. The work around for me is to disable the window and toolbar in main.xml as already explained, and just periodically check the notifications page.  Not ideal, but it works.  If anyone can figure out why this isn’t working properly I’d love to hear it.  I would file a bug report, but I don’t know if it’s actually a bug or if it’s just not working for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
i960
Guru
 
Avatar
Total Posts:  633
Joined:  2007-10-01
Bakersfield, CA
 

I think I figured out why it’s not working.  In the code I posted above, !is_null($this->_aclResourcePath) is always returning false, presumably because $this->_aclResourcePath isn’t being set anywhere.  I did a search through every single file in my Magento install, and it doesn’t show up anywhere else except in that function.  Because it’s returning false, it never even gets to the part where it checks what the permissions are in the database, so the function will just return true and allow the popup.

To fix, just replace the function above with this one:

/**
     * Check if current block allowed in ACL
     *
     * @param string $resourcePath
     * @return bool
     */
    protected function _isAllowed()
    
{
        
return Mage::getSingleton('admin/session')->isAllowed('admin/system/adminnotification/show_toolbar');
    
}

That will take care of the popup window.  Still trying to figure out how to do the same for the toolbar.

 
Magento Community Magento Community
Magento Community
Magento Community
 
i960
Guru
 
Avatar
Total Posts:  633
Joined:  2007-10-01
Bakersfield, CA
 

Figured it out for the toolbar as well.  You will need to make changes to this file: /app/code/core/Mage/Adminhtml/Block/Notification/Toolbar.php

First, look for the isShow() function, and change it to look like this:

/**
     * Check is show toolbar
     *
     * @return bool
     */
    public function isShow()
    
{
        
if (!$this->isOutputEnabled('Mage_AdminNotification')) {
            
return false;
        
}
        
if ($this->getRequest()->getControllerName() == 'notification'{
            
return false;
        
}
        
if ($this->getCriticalCount() == && $this->getMajorCount() == && $this->getMinorCount() == && $this->getNoticeCount() == 0{
            
return false;
        
}
        
if (!$this->_isAllowed()) {
            
return false;
        
}
        
return true;
    
}

The part I added is this:

if (!$this->_isAllowed()) {
            
return false;
        
}

Next you need to add the same _isAllowed() function that’s in Window.php.  So at the bottom of the file before the closing brace, add this:

/**
     * Check if current block allowed in ACL
     *
     * @param string $resourcePath
     * @return bool
     */
    protected function _isAllowed()
    
{
        
return Mage::getSingleton('admin/session')->isAllowed('admin/system/adminnotification/show_toolbar');
    
}

That’s it, should respect permissions now. Note that it’s best to not edit core files directly.  You should copy these files and their corresponding directory structure into /app/code/local/ before making any changes.

 
Magento Community Magento Community
Magento Community
Magento Community
 
i960
Guru
 
Avatar
Total Posts:  633
Joined:  2007-10-01
Bakersfield, CA
 

It appears there was already a bug report for this with a fix posted, and it was closed.  However, those changes don’t appear in the file referenced in version 1.3.2.1.  See here:

http://www.magentocommerce.com/bug-tracking/issue?issue=4108

 
Magento Community Magento Community
Magento Community
Magento Community
 
i960
Guru
 
Avatar
Total Posts:  633
Joined:  2007-10-01
Bakersfield, CA
 

Did some more digging and found out why $_aclResourcePath wasn’t being set.  It used to be in version 1.3.0, but it’s not in version 1.3.2.1.  So in Window.php, it’s missing this line:

protected $_aclResourcePath 'admin/system/adminnotification/show_toolbar';

All you need to do to get it working for the popups is to add that line back in.  Put it underneath this line:

protected $_available;

For the toolbar, just apply the fix that’s in the bug report link above.  It’s a simpler fix than what I posted.

 
Magento Community Magento Community
Magento Community
Magento Community
 
popart
Jr. Member
 
Total Posts:  29
Joined:  2009-01-05
 

These fixes don’t work for Magento ver. 1.3.2.3. I’ve tried editing both files, but the changes cause errors.

nostrzak - 14 August 2008 12:56 AM

If you want totaly disable notifications do as follow:

1) Remove from app/design/adminhtml/default/default/layout/main.xml two lines:

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

and

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

2) Change following code in app/etc/modules/Mage_All.xml

<Mage_AdminNotification>
            <
active>true</active>
            <
codePool>core</codePool>
            <
depends>
               <
Mage_Core />
            </
depends>
        </
Mage_AdminNotification>

into

<Mage_AdminNotification>
            <
active>false</active>
            <
codePool>core</codePool>
            <
depends>
               <
Mage_Core />
            </
depends>
        </
Mage_AdminNotification>

These fixes don’t work for Magento ver. 1.3.2.3. I’ve tried editing both files, but the changes cause errors.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrantoniodavid
Member
 
Avatar
Total Posts:  35
Joined:  2009-02-14
New Jersey, U.S.
 

Instead of editing the Mage_All.xml file, you can effectively make this change directly via the Admin panel by disabling that module’s output:

In the Admin, navigate to System > Configuration > Advanced > Advanced and expand the “Disable modules output” menu.  Proceed to disable the module labeled “Mage_AdminNotification” and finally click “Save Config”.

Cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
 
LloydI
Jr. Member
 
Total Posts:  26
Joined:  2009-09-20
 

mrantoniodavid - this does not work. The only way i’ve found is to totally remove the code block.

 
Magento Community Magento Community
Magento Community
Magento Community
 
LloydI
Jr. Member
 
Total Posts:  26
Joined:  2009-09-20
 

What really gets me is this thread is how old?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2