How to remove/disable Add to Compare Products function in Magento


Compare Product is a Magento function that is integrated with Magento by default. You may find this function not necessary for your Magento store and you want to completely remove it? This tutorial for beginners will guide you steps by steps how to Remove Compare product function from your Magento site by making a few modifications.

how to remove add to compare in magento

Step 1:

Use a FTP client like Winscp, CuteFTP, open list.phtml file located in app/design/frontend/default/yourtheme/template/catalog/

remove compare product magento list phml

Step 2: Remove add to compare function from product list view and product grid view

Now we will remove add to compare function Product list view and product grid view.

Search for the following code and remove it from list.phtml

You can remove the code or simply comment it  <!– comment –>

Do the same to make changes in a grid view.

Step 3: Remove add to compare function from product list view and product grid view

To remove Add To Compare option from product page, first, we will copy addto.phtml file from app/design/frontend/base/default/template/catalog/product/view/ and paste to app/design/frontend/default/yourtheme/template/catalog/product/view/

After copying the file, locate and remove or comment the following code in addto.phtml:

Step 4: Remove Add To Compare option from the sidebar

Now we will remove Add To Compare option from the sidebar of our Magento website.

First, locate catalog.xml file in app/design/frontend/default/yourtheme/layout directory and remove or comment the following code:

After you are done, save the edited catalog.xml file and see the result.

Quick note

Sometimes you may need to clear Magento and Browser cache to see the changes, to do this go to Admin section >Select System>Cache Management and select all option to clear Magento and Browser cache.

clear cache in magento

Now open your Magento website and refresh the page with shortcut CTRL+F5 (this shortcut will do cache refresh of your browser, and will guarantee that if the content is changed, you will get the new content).

Did you have any troubles while removing Add to compare function? Feel free to ask or comment here, I’m willing to help you out.

Happy coding

Rate this post


About Author

Brian is a Magento developer with 5 years of experience with customizing Magento extensions, Magento templates. He's main author at Magento explorer

Leave A Reply