How to add a new tab to the product edit page in admin !

How to add a new tab to the product edit page in admin !

There are 2 ways to add a new tab to the product edit page in admin panel of Magento.

First method: Let’s add a tab for a custom module. Add the following code to your config.xml file in the global scope:

123

After this you should create a new file: Company/ModuleName/Block/Adminhtml/Tabs.php The content of this file you can see below

hhjh

 

The code above rewrites the system function which generates the layout and adds the tab. Next, you need to create a file: Company/ModuleName/Block/Adminhtml/Tabs/Tabid.php

hinh so 3

Note: template should be in app/design/adminhtml/…/…/template/

 Second method: Simply copy the file app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php to a local folder (app/code/local/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php) and add the following snippet to the function _prepareLayout()

hinh so 4

Hope this Magento tutorial helps!

Check out many useful Magento extensions and themes  by us!

Source : atwix.com

 

 

 

 

 

 

 
6837 Total Views 2 Views Today
  • http://mincoding.blogspot.com/ Micoding Site

    3 ways, add an attribute to a tab that you want, then after setup magento will render automatically. if not exist, it will create new

  • http://weelii.com/magento-themes/ Samantha

    Thanks for this tutorial. Helped me a lot.