Magento - remove tab from product view using local.xml

A really simple question with (I pose) a very simple answer ... I want to remove one of the product information tabs from my product viewing page. I want to remove the tab that shows the attributes, and not comment on it in the catalog.xml file. I want to remove it correctly through local.xml.

<action method="addTab" translate="title" module="catalog">
<alias>additional</alias><title>Additional Information</title>
<block>catalog/product_view_attributes</block>
<template>catalog/product/view/attributes.phtml</template>
</action>

I thought there might be a removeTab method , but that didn't work. There is also a method = "unsetChild" , but I don’t see how I would aim at this particular element, since there was no specific name in XML.

Any ideas would be highly appreciated.

+5
source share
2

Mage_Catalog_Block_Product_View_Tabs::addTabs(), :

<!-- language: xml -->
<catalog_product_view>
    <reference name="product.info.tabs">
        <action method="unsetChild">
            <child>additional</child>
        </action>
    </reference>
</catalog_product_view>

:

<catalog_product_view>
    <remove name="additional" />
</catalog_product_view>

, , , , addTab() .

Zyava , , . app/etc/local.xml( ) local.xml .

+10

adminhtml layout xml ( local.xml, tweakking.)

-, ( config.xml) :

<adminhtml>
    <layout>
        <updates>
            <mymodule>
                <file>mymodule.xml</file>
            </mymodule>
        </updates>
    </layout>
</adminhtml>

mymodule.xml ( )

<adminhtml_sales_order_view>
    <reference name="sales_order_tabs">
        <action method="removeTab">
            <name>order_shipments</name>
        </action>
        <action method="addTabAfter">
            <name>order_shipments_mymodule</name>
            <block>mymodule/adminhtml_order_shipments</block>
            <after>order_creditmemos</after>
        </action>
        <action method="addTab">
            <name>order_receipts</name>
            <block>mymoduled/adminhtml_order_recp</block>
        </action>
    </reference>
</adminhtml_sales_order_view>

, ! ( )

+2

All Articles