Request Quote

Add New Tab in Category Page in Magento 1 admin panel

Add New Tab in category in Magento 1 admin panel

Today we will see how to add new tab in category in Magento 1 admin panel.

There are 2 ways of doing so. We can always override this core magento block file Mage_Adminhtml_Block_Catalog_Category_TabsBut this way is not very efficient. In that block file we can see a dispatch event adminhtml_catalog_category_tabs. This event can be used to add tabs in this manner-

In config.xml file

<global>
    <events>
        <adminhtml_catalog_category_tabs>
            <observers>
                <Webkul_Module_Model_Observer>
                    <type>singleton</type>
                    <class>Webkul_Module_Model_Observer</class>
                    <method>newTab</method>
                </Webkul_Module_Model_Observer>
            </observers>
        </adminhtml_catalog_category_tabs>
    </events>
</global>

Next in the above mentioned Observer.php file

public function newTab($observer)
{
    $tabs = $observer->getTabs();
    $tabs->addTab('customtab', array(
        'label'     => Mage::helper('module')->__('Custom Tab'),
        'content'   => "This is a custom tab"
    ));
}

This will give us a new custom tab

That’s it.

Happy coding 🙂

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close