In Magento we can remove Compare Products block so easily from the home page. Just follow the steps given below to get rid of it from your home page and other pages.
1. In your magento store admin panel, Go to System-> Configuration and then select Design on the left side bar.
2. Check if your package is ‘default‘ or ‘somecustomethemename‘ . If its ‘default’ then go the following folder location
Youstoreroot/app/design/frontend/default/default/
In case of custom theme go to the following location
Youstoreroot/app/design/frontend/yourcustomtheme/default/
3. Create layout folder if its not there
4. Create a new layout file called “local.xml” inside layout folder
and place the code below into it and save it.
1 |
<? xml version = "1.0" ?> |
2 |
< layout version = "0.1.0" > |
3 |
< default > |
4 |
< remove name = "catalog.compare.sidebar" /> |
5 |
</ default > |
6 |
</ layout > |
5. Go To System->cache management and refresh the cache types “Layouts“
and “Block HTML output“. We ‘re done with this.
6. After refreshing just reload your page and find “Compare Products” has been removed from the sidebar in all your magento pages.
Please ignore the instructions below , as its no more recommended and highly discouraged.
1. Go to yourStorename\app\design\frontend\base\default\layout
In this case its demostore\app\design\frontend\base\default\layout
and find the file “catalog.xml“.
2. We have to override this file by our default template. Create same directory structure what we had for catalog.xml inside base template.
Create Two folders named “template” and “layout” inside app/design/frontend/default/default
3. Copy the File “Catalog.xml” inside the layout folder what we have created inside the default folder.
4. Now open the catalog.xml file which we have copied just now inside default folder and comment out the code attached below which are inside the tag <reference name=”right”>.
FYI : Kindly use HTML comments <!– –>.
<!–
<block type=”catalog/product_compare_sidebar” before=”cart_sidebar” name=”catalog.compare.sidebar” template=”catalog/product/compare/sidebar.phtml”/>
–>
And also comment out the code given below in catalog.xml
<!–
<catalog_product_compare_index translate=”label”>
<label>Catalog Product Compare List</label> –>
<!– Mage_Catalog –>
<!– <reference name=”root”>
<action method=”setTemplate”><template>page/popup.phtml</template></action>
</reference>
<reference name=”head”>
<action method=”addJs”><script>scriptaculous/scriptaculous.js</script></action>
<action method=”addJs”><script>varien/product.js</script></action>
</reference>
<reference name=”content”>
<block type=”catalog/product_compare_list” name=”catalog.compare.list” template=”catalog/product/compare/list.phtml”/>
</reference>
</catalog_product_compare_index>
<customer_account_index>
<reference name=”right”>
<action method=”unsetChild”><name>catalog.compare.sidebar</name></action>
</reference>
</customer_account_index> –>
5. Go to Varien / Cache directory and delete the files or flush your cache from the Magento admin panel. Now refesh the browser and see the compare products block has been removed successfully from the home page.