Hello,
I need delete up-sell tabs inside product edit in admin panel. Can anybody help me?
Thank you!
Go to: \app\design\adminhtml\default\default\layout\catalog.xml
and comment the code below:
<adminhtml_catalog_product_upsell> <block type="core/text_list" name="root" output="toHtml"> <block type="adminhtml/catalog_product_edit_tab_upsell" name="catalog.product.edit.tab.upsell"/> <block type="adminhtml/widget_grid_serializer" name="upsell_grid_serializer"> <reference name="upsell_grid_serializer"> <action method="initSerializerBlock"> <grid_block_name>catalog.product.edit.tab.upsell</grid_block_name> <data_callback>getSelectedUpsellProducts</data_callback> <hidden_input_name>links[upsell]</hidden_input_name> <reload_param_name>products_upsell</reload_param_name> </action> <action method="addColumnInputName"> <input_name>position</input_name> </action> </reference> </block> </block> </adminhtml_catalog_product_upsell>
The Up-sell tab will be removed.
Thank you! I going to test
The short answer is you need to add the below snippet to both adminhtml_catalog_product_new and adminhtml_catalog_product_edit:
<reference name="product_tabs">
<action method="removeTab"><name>upsell</name></action>
</reference>
However allthough you could do that in app\design\adminhtml\default\default\layout\catalog.xml it's best to create a small module with your own custom adminhtml .xml update file as below otherwise everytime you upgrade Magento your changes will be completely wiped out.
app/etc/modules/Namespace_Modulename.xml (Initalization file for your new module)
<?xml version="1.0"?>
<config>
<modules>
<Namespace_Modulename>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Catalog/>
</depends>
</Namespace_Modulename>
</modules>
</config>
app/code/local/Namespace/Modulename/etc/config.xml (config.xml file to add our custom layout .xml file)
<?xml version="1.0"?>
<config>
<modules>
<Namespace_Modulename>
<version>0.1.0</version>
</Namespace_Modulename>
</modules>
<adminhtml>
<layout>
<updates>
<namespace_modulename>
<file>namespace/modulename.xml</file>
</namespace_modulename>
</updates>
</layout>
</adminhtml>
</config>
app/design/adminhtml/namespace/modulename.xml (adds the remove action to a custom update handle and applied that handle to both adminhtml_catalog_product_new and adminhtml_catalog_product_edit.
<?xml version="1.0"?>
<config>
<adminhtml_new_and_edit>
<reference name="product_tabs">
<action method="removeTab"><name>upsell</name></action>
</reference>
</adminhtml_new_and_edit>
<adminhtml_catalog_product_new>
<update handle="adminhtml_new_and_edit"/>
</adminhtml_catalog_product_new>
<adminhtml_catalog_product_edit>
<update handle="adminhtml_new_and_edit"/>
</adminhtml_catalog_product_edit>
</config>