How to hide ‘Add Item’ button in Magento Backend Grid

In some cases you might need to hide the ‘Add Item’ button on the grid page in backend module for admin. This may eat your head if you have no idea of what is going on. But this is as simple as nothing. Follow the below given steps and you are done in less than a minute.

Open appcodelocal<namespace><module>BlockAdminhtml<module>.php and perform following changes:

<?php
class <Namespace>_<Module>_Block_Adminhtml_<Module> extends Mage_Adminhtml_Block_Widget_Grid_Container
{
public function __construct()
{
$this->_controller = 'adminhtml_<module>';
$this->_blockGroup = '<module>';
$this->_headerText = Mage::helper('<module>')->__('My Custom Module');
// $this->_addButtonLabel = Mage::helper('<module>')->__('Add Item'); /*Comment out this line*/
parent::__construct();
$this->_removeButton('add'); /*Add this line after calling parent constructor*/
}
}

And you are done!

Written by Arvind Bhardwaj

Arvind is a certified Magento 2 expert with more than 10 years of industry-wide experience.

Website: http://www.webspeaks.in/

8 thoughts on “How to hide ‘Add Item’ button in Magento Backend Grid

  1. Thanks for your instructions!

    Do you know if is possible to hide the button to specific products which fulfill an atribute?

    Or to a specific category but not to the whole store?

    Thanks.

Comments are closed.