Sorry, nothing in cart.
Product comparison feature is loved by many customers as it gives them a precise idea about the interesting products in one place but this feature is not apt for few stores who do not wish to have product comparison feature. If you run a music store then comparing between two different music albums or songs would be of no real use.
Developer around the world scratch their head when it comes to getting rid of Product Comparison feature (RHS box) from their site layout. Although, this feature is default in Magento but their are options which will help you to remove this feature from your Magento store.
With a little bit of PHP knowledge and Magento customization you can easily get rid of Magento Product comparison functionality from your site. Most of the magento installation run cache which will not let you see your changes as you edit the files. It is advised to turn your cache off before induging yourself into the act and turn the cache on once you are satisfied with your changes i.e. removing Magento Product Comparison. You can enable/disable your cache from System -> Cache Management option given in Magento admin panel.
Getting rid of Product Comparison Box and feature
In order to achieve this you need to make changes in 6 different places which are given below:
In order to make changes in your catalog.xml file you should open app/design/frontend/deafult/YourTheme/layout/catalog.xml in your favorite PHP editor and delete the following lines of code and save the file.
Now open reports.xml file by opening app/design/frontend/deafult/YourTheme/layout/reports.xml in your favorite PHP editor and delete the two lines in am mentioning below. You can search the two lines and delete both of them from reports.xml file.
Open customer.xml by editing app/design/frontend/default/YourTheme/layout/customer.xml in your favorite editor and delete the following line of code then save the file.
Now, save the file and refresh your page and see if the box is still there. Hopefully you should not see the box. There is few more thing left to be done to entirely remove the “Add To Compare” link.
Open addto.phtml by opening app/design/frontend/default/YourTheme/template/catalog/product/view/addto.phtml in your favorite PHP editor and delete the following lines of code and save the file.
< ?php if($_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product) ): ?>
Open list.phtml by editing app/design/frontend/default/YourTheme/catalog/product/list.phtml in your favorite PHP editor and delete the following 2 code blocks.
getAddToCompareUrl($_product)): ?> | __('Add to Compare') ?>
Finally open crosssell.phtml by editing app\design\frontend\default\default\template\checkout\cart in your favorite PHP editor and delete the following lines of code.
__('Add to Compare') ?>
Now, refresh the page and you won’t see Product comparison instance or its link anywhere on your store. Please leave me a comment and share your experiences of removing Product comparison feature from your Magento powered store. Don’t forget to subscribe to our RSS to receive latest updates delivered to your mailbox for Free!