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:
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!
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.
thnx a lot
HI
I Want to hide “Reset filter” ?
I just wanna say thank you for the information that you have been shared to us readers. Thanks for posting this kind of theme.
This is very wonderful so nice and beautiful information thanks for this post.
Thanks for sharing these useful information! Hope that you will continue doing nice article like this.
Very interesting topic and useful post. It really help me. THANK YOU!!!
I AM a fan of your blog.