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?

  • you start your layout file with </layout> , that's a closing tag – Robin Jul 28 '16 at 11:47
  • @Anja, thanks but that typo was just in the question, not in my code – Holly Jul 28 '16 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 Jul 28 '16 at 12:18
  • I'm adding the code in local.xml – Holly Jul 28 '16 at 12:26
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'.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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