2

Need to add new tab to Catalog , Product Mass action page, as shown

enter image description here

Basically I am working on Add Category option to mass update product functionality

These default tabs are being added in app/design/adminhtml/default/default/layout/catalog.xml

<adminhtml_catalog_product_action_attribute_edit>
    <reference name="left">
        <block type="adminhtml/store_switcher" name="store_switcher" template="store/switcher.phtml" />
        <block type="adminhtml/catalog_product_edit_action_attribute_tabs" name="attributes_tabs">
            <block type="adminhtml/catalog_product_edit_action_attribute_tab_attributes" name="tab_attributes"/>
            <block type="adminhtml/catalog_product_edit_action_attribute_tab_inventory" name="tab_inventory" template="catalog/product/edit/action/inventory.phtml" />
            <block type="adminhtml/catalog_product_edit_action_attribute_tab_websites" name="tab_websites" template="catalog/product/edit/action/websites.phtml" />
            <action method="addTab"><name>attributes</name><block>tab_attributes</block></action>
            <action method="addTab"><name>inventory</name><block>tab_inventory</block></action>
            <action method="addTab"><name>websites</name><block>tab_websites</block></action>
        </block>
    </reference>
    <reference name="content">
        <block type="adminhtml/catalog_product_edit_action_attribute" name="attribute" template="catalog/product/edit/action/attribute.phtml" />
    </reference>
</adminhtml_catalog_product_action_attribute_edit>
2
  • This can be part of it. but not duplicate. :) Oct 7, 2016 at 7:27
  • @TejabhagavanKollepara you cannot cross duplicate the question. Oct 7, 2016 at 11:50

1 Answer 1

1

For adding the tab use xml

 <adminhtml_catalog_product_action_attribute_edit>
        <reference name="attributes_tabs">
            <action method="addTab"><name>test</name><block>test/adminhtml_test_edit_tab_itemform</block></action>
        </reference>
</adminhtml_catalog_product_action_attribute_edit>

Itemform.php

<?php
class testtest_Block_Adminhtml_Test_Edit_Tab_Itemform  extends Mage_Core_Block_Template implements Mage_Adminhtml_Block_Widget_Tab_Interface
{
public function _construct()
    {
        parent::_construct();

        $this->setTemplate('test/test.phtml');
    }

    /**
     * Retrieve the label used for the tab relating to this block
     *
     * @return string
     */
    public function getTabLabel()
    {
        return $this->__('Extra FIelds');
    }

    /**
     * Retrieve the title used by this tab
     *
     * @return string
     */
    public function getTabTitle()
    {
        return $this->__('Extra FIelds');
    }

    /**
     * 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;
    }


    /**
     * AJAX TAB's
     * If you want to use an AJAX tab, uncomment the following functions
     * Please note that you will need to setup a controller to recieve
     * the tab content request
     *
     */
    /**
     * Retrieve the class name of the tab
     * Return 'ajax' here if you want the tab to be loaded via Ajax
     *
     * return string
     */
#   public function getTabClass()
#   {
#       return 'my-custom-tab';
#   }

    /**
     * Determine whether to generate content on load or via AJAX
     * If true, the tab's content won't be loaded until the tab is clicked
     * You will need to setup a controller to handle the tab request
     *
     * @return bool
     */
#   public function getSkipGenerateContent()
#   {
#       return false;
#   }

    /**
     * Retrieve the URL used to load the tab content
     * Return the URL here used to load the content by Ajax 
     * see self::getSkipGenerateContent & self::getTabClass
     *
     * @return string
     */
#   public function getTabUrl()
#   {
#       return null;
#   }
}
8

Not the answer you're looking for? Browse other questions tagged or ask your own question.