Add A Tab To The Admin Product Screen

Updated . Posted . Visible to the public.

Adding A Tab To The Product Screen

  1. Declare an admin layout XML file for your module in your config.xml:

    your-module.xml
  2. Create the layout XML in /app/design/adminhtml/default/default/layout/your-module.xml:

    your_module_some_tab your_module/adminhtml_catalog_product_tab
  3. 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; } }
  4. Create a data helper to support translation, if your module does not have one already

  5. Make the tabs template in /app/design/adminhtml/default/default/template/catalog/product/tab/some-tab.phtml:

    Some Heading

         </div>
     </div>
    

Mike Whitby
Last edit
Posted by Mike Whitby to Magento (2012-08-29 10:16)