Remove Callouts from Left - Right Catalog Columns

Last modified by ForgetHangovers on Thu, June 24, 2010 17:10
Source|Old Revisions  

This is an old revision of the document!


You can remove the Magento default callouts from either the left or right column by a simple edit to the ‘catalog.xml’ layout file.

Let’s remove the callout from the Left-hand column first

Locate and open the file in the app/design/frontend/default/default/layout/ directory (folder) and open it in your favorite editor. (If you’ve created your own interface or theme, remember to use the appropriate folder name in place of ‘default’). Find the following code block.

  1.         <reference name="left">
  2.            <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
  3.                 <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
  4.                 <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800) DEMO-NUMBER.</alt></action>
  5.                 <action method="setLinkUrl"><url>checkout/cart</url></action>
  6.             </block>
  7.         </reference>

The simplest thing to do is to comment out the piece you don’t want. In this case I’m going to comment out everything between the <block> </block> tags, which gives me the following:

  1.         <reference name="left">
  2.         <!--    This comments out the callout image included in the default installation. jdb
  3.         <block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
  4.                 <!-- <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
  5.                 <!-- <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800) DEMO-NUMBER.</alt></action>
  6.                 <!-- <action method="setLinkUrl"><url>checkout/cart</url></action>
  7.             </block> -->
  8.         </reference>

This will remove the callout in the left-hand column once you save and upload the file to your server. Note that I have commented out several lines of code in this example.

Next, I’m going to remove the callout in the right-hand column

Locate this block of text in the same file. (It should following the previous code.)

  1.         <reference name="right">
  2.             <block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
  3.             <!--<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/>-->
  4.         </reference>

In this example I’ve already commented out the second block tag. Now when you save this file and upload it to your server you should find that the Magento default callouts are no longer visible on any of the catalog pages set to 2 or 3 column formats.

Of course, this method implies the method to change or move callouts.




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs