Remove the custom design tab from magento category edit page.
2 Answers
First of all i am asuming you know how to create module [If not please check This ]
You can remove a tab using the method Mage_Adminhtml_Block_Widget_Tabs::removeTab()
. Every edit page in Magento (admin side) is actually child block of Mage_Adminhtml_Block_Widget_Tabs
block class.
To remove tab you have to create extension for that and obsever
adminhtml_catalog_category_tabs
As a start up
File : app\code\community\Keyur\RemoveCategoryTab\etc\config.xml
<config>
<modules>
<Keyur_RemoveCategoryTab>
<version>1.0.0</version>
</Keyur_RemoveCategoryTab>
</modules>
<global>
<models>
<keyur_RemoveCategoryTab>
<class>keyur_RemoveCategoryTab_Model</class>
</keyur_RemoveCategoryTab>
</models>
</global>
<adminhtml>
<events>
<adminhtml_catalog_category_tabs>
<observers>
<remove_category_product_tab_from_edit_page>
<class>keyur_RemoveCategoryTab/observer</class>
<method>removeUnwantedCategoryTabs</method>
</remove_category_product_tab_from_edit_page>
</observers>
</adminhtml_catalog_category_tabs>
</events>
</adminhtml>
</config>
Now create observer file
File : app\code\community\Keyur\RemoveCategoryTab\Model\Observer.php
class Keyur_RemoveCategoryTab_Model_Observer
{
public function removeUnwantedCategoryTabs(Varien_Event_Observer $observer)
{
$tabs = $observer->getEvent()->getTabs();
$tabs->removeTab('group_6');
return $this;
}
}
Where group_6
is tab id [You can check by inspecting element
And see the magic.
Let me know if you have any query
Not the best but simple way, use below property in your CSS :
#category_info_tabs > li:nth-child(3) {
display: none;
}
-
Thanks for your answer, but i am expecting code level restriction.– senthilCommented Apr 30, 2015 at 10:54