B-219 Sec-55 Noida, India
+918010221733

Remove or rename ‘Add New’ button from Admin Grid Magento

Rename ‘Add New’ button

Here are the steps to rename the ‘Add New’ text to anything you required (for example, ‘Add Report’):-
– Go to YourNamespace -> YourModule -> Block -> Adminhtml -> YourFile.php
– Add the following code in the constructor of this file:-

$this->_addButtonLabel = Mage::helper('yourmodulename')->__('Add Report');


Remove ‘Add New’ button

Here are the steps to remove the ‘Add New’ button:-
– Go to YourNamespace -> YourModule -> Block -> Adminhtml -> YourFile.php
– Add the following code in the constructor of this file (it should be just below the call to parent constructor):-

parent::__construct();
$this->_removeButton('add');

(Visited 46 times, 1 visits today)

Leave a reply