I have created a custom tab under catalog product, the tab is coming fine but when i click on the tab the template for the block is not loading. It echo what i type but it is not fetching the template. I write this function in a class HTC_Csvpricing_Block_Adminhtml_Catalog_Product_Tab extends Mage_Adminhtml_Block_Template implements Mage_Adminhtml_Block_Widget_Tab_Interface
public function _construct()
{
parent::_construct();
echo "I m here";
$this->setTemplate('csvpricing/tab.phtml');
}
Here what I write in app/design/adminhtml/default/default/layout/csvpricing.xml
<csvpricing_adminhtml_csvpricing_index>
<reference name="content">
<block type="csvpricing/adminhtml_csvpricing" name="csvpricing" />
</reference>
</csvpricing_adminhtml_csvpricing_index>
<adminhtml_catalog_product_edit>
<reference name="product_tabs">
<action method="addTab">
<name>csvpricing_tab</name>
<block>csvpricing/adminhtml_catalog_product_tab</block>
</action>
</reference>
</adminhtml_catalog_product_edit>
Please guide what I am missing.
Thanks
You can do as follow :
Module config.xml
Create the layout XML in /app/design/adminhtml/default/default/layout/your-module.xml:
Create the tab block in {your_module}/Block/Adminhtml/Catalog/Product/Tab.php:
you need to 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: