Edit / Remove Callout section from left / right sidebar in Magento



In Magento, by default there are two callout section in Left and Right side. For the reason there are advertisement shown in both sidebar means in left as well as in the right sidebar. If we are working on our own theme them it is necessary to Edit/Remove the callout section, In Mgento you can Edit/Remove the callout. Methods and procedures are given below:

Method 1 : For the changes into the callout section open the catalog.xml file with any code editor of your choice.

Navigate to the app/design/frontend/default/your_theme_name/layout/catalog.xml and open the catalog.xml. If you are not able to find out catalog.xml here then go to app/design/frontend/base/default/layout/catalog.xml and search for the following code given below:

<reference name="left">
<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
    <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
    <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
    <action method="setLinkUrl"><url>checkout/cart</url></action>
</block>
</reference>
<reference name="right">
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
    <action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
    <action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>
</block>
</reference>

Now Comment / Replace the code as given below:

<reference name="left">
<!-- <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
    <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
    <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
    <action method="setLinkUrl"><url>checkout/cart</url></action>
</block>-->
</reference>
<reference name="right">
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
<!--<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
    <action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
    <action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>
</block>-->
</reference>

Please remember that do not remove the opening and closing of the
After that Save the file and Refresh the Cache because you are edited the XML file, so it is very Important to Refresh the Cache.

Method 2 : Open the right_col.phtml and left_col.phtml files located as app/design/frontend/default/your_theme_name/template/callouts/ if it is not here then navigate to app/design/frontend/base/default/template/callouts/ and open it with any code editor of your choice and Comment / Remove the content

Comment / Remove the following code from the left_col.phtml

<div class="block block-banner">
    <div class="block-content">
        <?php if(strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>
            <a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
        <?php elseif($this->getLinkUrl()): ?>
            <a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
        <?php endif; ?>
            <img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
        <?php if($this->getLinkUrl()): ?>
        </a>
        <?php endif ?>
    </div>
</div>

Comment / Remove the following code from the right_col.phtml

<div class="block block-banner">
    <div class="block-content">
        <?php if(strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>
            <a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
        <?php elseif($this->getLinkUrl()): ?>
            <a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
        <?php endif; ?>
            <img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
        <?php if($this->getLinkUrl()): ?>
        </a>
        <?php endif ?>
    </div>
</div>

Now, you can Save the Blank file. Plaese refresh the browser cache and examine the changes.