Adding A Tab To The Product Screen
-
Declare an admin layout XML file for your module in your config.xml:
your-module.xml -
Create the layout XML in /app/design/adminhtml/default/default/layout/your-module.xml:
your_module_some_tab your_module/adminhtml_catalog_product_tab -
Create the tab block in {your_module}/Block/Adminhtml/Catalog/Product/Tab.php:
setTemplate('catalog/product/tab/some-tab.phtml'); } /** * Retrieve the label used for the tab relating to this block * * @return string */ public function getTabLabel() { return $this->__('Some Tab'); } /** * Retrieve the title used by this tab * * @return string */ public function getTabTitle() { return $this->__('Some Tab'); } /** * Determines whether to display the tab * Add logic here to decide whether you want the tab to display * * @return bool */ public function canShowTab() { return true; } /** * Stops the tab being hidden * * @return bool */ public function isHidden() { return false; } } -
Create a data helper to support translation, if your module does not have one already
-
Make the tabs template in /app/design/adminhtml/default/default/template/catalog/product/tab/some-tab.phtml:
Posted by Mike Whitby to Magento (2012-08-29 10:16)