0

I'm trying to remove the product info/collateral box from the product page. I've tried using the below methods without success:

<layout>    
    <catalog_product_view>
        <reference name="product.info">
            <!--<remove name="info_tabs" />-->
            <!--<remove name="product.info.tabs" />-->
            <!--<action method="unsetChild"><name>info_tabs</name></action>-->
            <action method="unsetChild"><name>product.info.tabs</name></action>
        </reference>
    </catalog_product_view>
</layout>

I'm using the <reference name="product.info"> as it is used in the parent theme's.

<reference name="product.info">
    <!-- Add tabs -->
    <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml">

Im able to remove the product info/collateral box by just commenting the below section of code out of the catalog/product/view.phtml template, but this not seem to be the best practice.

<div class="row product-collateral">
    <?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
        <div class="box-collateral <?php echo "box-{$alias}"?>">
            <?php if ($title = $this->getChildData($alias, 'title')):?>
                <h2><?php echo $this->escapeHtml($title); ?></h2>
            <?php endif;?>
            <?php echo $html; ?>
        </div>
    <?php endforeach;?>
        <?php echo $this->getChildHtml('upsell_products') ?>
        <?php echo $this->getChildHtml('product_additional_data') ?>
</div>

Is there a way I can remove this with Layout XML?

4
  • you start your layout file with </layout> , that's a closing tag
    – Robin
    Commented Jul 28, 2016 at 11:47
  • @Anja, thanks but that typo was just in the question, not in my code
    – Holly
    Commented Jul 28, 2016 at 12:14
  • in which file are you adding the layout? the code should be <remove name="product.info.tabs" />.. maybe try adding it in local.xml or catalog.xml?
    – Robin
    Commented Jul 28, 2016 at 12:18
  • I'm adding the code in local.xml
    – Holly
    Commented Jul 28, 2016 at 12:26

1 Answer 1

1

Use this code:

<catalog_product_view translate="label">            
    <reference name="product.info">
        <action method="unsetChild">
            <alias>description</alias>
        </action>
        <action method="unsetChild">
            <alias>reviews</alias>
        </action>
    </reference>
</catalog_product_view>

Also add more action which you want to remove and in alias use name which use in block 'as'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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