cancel
Showing results for 
Search instead for 
Did you mean: 

Removing blocks on catalogue page

Removing blocks on catalogue page

Hey!

 

I was wondering how I delete the 'Recently viewed' and 'compare products' from the catalogue page. I've tried something using sources form the internet and this is what my local.xml looks like. It doesn't work though...

 

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
	<remove name="left.permanent.callout" />
	<remove name="right.permanent.callout" />
   	<remove name="catalog.compare.sidebar" />
   	<remove name="paypal.partner.right.logo" />
   	<remove name="cart_sidebar" />
   	<remove name="left.reports.product.viewed" />
   	<remove name="right.reports.product.viewed" />
   	<remove name="right.reports.product.compared" />
        
	<reference name="head">
            <action method="addCss"><stylesheet>css/javcustom.css</stylesheet></action>
        </reference>
     </default>

     <catalog>
	<remove name="left.permanent.callout" />
	<remove name="right.permanent.callout" />
   	<remove name="catalog.compare.sidebar" />
   	<remove name="paypal.partner.right.logo" />
   	<remove name="cart_sidebar" />
   	<remove name="left.reports.product.viewed" />
   	<remove name="right.reports.product.viewed" />
   	<remove name="right.reports.product.compared" />
     </catalog>
</layout>

 

Anyone that can help figuring out what is wrong? Thanks!

 

 

9 REPLIES 9

Re: Removing blocks on catalogue page

Hi @olivierdesmet 

 

Your example code looks uust about correct. 

 

But as far as I know there is no handle called catalog, however removing them in the default handle should be sufficient. 

 

There could be a few thing that have gone wrong, off the top of my head two springs to mind.

 

Your design dosn't point correctly to the layout. You can check that just be seeing if your page now includes your custom JS file (javcustom.css), if it doesn't go to System > Configuration > Design and check that the layout is pointing to the correct template. And remember to clear your Layout cache after (System > Cachemangement)

 

If we you are using a template, you should check if it renames catalog.compare.sidebar to something else. Check if the template contains a catalog.xml file, and see if you can find something simulairly named. And then add that to your remove list.

 

I hope this helps :-)

Re: Removing blocks on catalogue page

Thank you for your reply @Theis Corfixen Smiley Happy

 

As I understand correctly, the theme uses the default catalog.xml. However, the local.xml does not remove those blocks, so I'm a bit at my wit's end Smiley Wink

Re: Removing blocks on catalogue page

Have you checked var/log/system.log to see if there are any errors associated with your layout? If you dont have logning endbled, go to System > Configuration > Developer and enabled logging.

Re: Removing blocks on catalogue page

Yes, just checked it and nothing comes up regarding my theme/layout..

Re: Removing blocks on catalogue page

Maybe this would help for reference (if this is not already what you found during your internet search):
http://www.magentocommerce.com/knowledge-base/entry/turning-on-off-magentos-content-blocks

-- Best regards --
Kent Christiansen | Magento Certified Solution Specialist

Re: Removing blocks on catalogue page

Use the handler "catalog_category_view" instead of just "catalog". Then inside it use reference "left" then add your remove codes inside it

Re: Removing blocks on catalogue page

"Then inside it use reference "left" then add your remove codes inside it" - darrensumaoy14

<remove /> directives do not belong in <reference /> directives. "Remove" prevents block instantiation entirely and is evaluated at a global level (i.e. outside of any parent block context).

 

 

 

 

-----
@benmarks, Senior Manager, Strategy & Growth

Re: Removing blocks on catalogue page

What exactly are you trying to accmplish? It looks like you are trying to empty out the entire column. I ask because there are better/easier ways to do this.

-----
@benmarks, Senior Manager, Strategy & Growth

Re: Removing blocks on catalogue page

I'm trying to get rid of the compare products and recently compared products blocks. I was trying to empty the whole column to see if the code works, but it doesn't...