- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Magento. How to disable compare products feature
February 10, 2015
In this tutorial you will learn how to remove Add To Compare option in Magento template(s).
Magento. How to disable compare products feature
-
Open list.phtml file located in app/design/frontend/default/themeXXX/template/catalog/product directory using your FTP client or FileManager in your Hosting Control panel:
-
You will need to remove “add to compare” option from product list view and/or product grid view.
-
Using CTRL+F search tool locate and remove the following code:
- | __('Add toCompare') ?>
-
You can remove the code or comment it out using two forward slash punctuation marks for PHP: //
-
For HTML you can use the following punctuation marks:
-
Do the same to alter items in a grid view.
-
In order to remove the Add To Compare option from the product page, you should copy addto.phtml file from app/design/frontend/base/default/template/catalog/product/view directory into app/design/frontend/default/themeXXX/template/catalog/product/view directory and remove or comment out the following code:
helper('catalog/product_compare')->getAddUrl($_product); ?>
- | __('Add to Compare') ?> -->
-
Lastly, if you want to remove the Add To Compare option from the sidebar, you need to edit catalog.xml file located in app/design/frontend/default/themeXXX/layout directory and remove the following code:
-
Save your changes and upload to the server replacing the original files.
-
Please note that you may need to clean Magento and Browser cache to see the changes:
-
Go to your_domain_name.com/index.php/admin;
-
Select System>Cache Management;
-
In Cache Control box check all options and in All Cache dropdown select Refresh;
-
Open your website and refresh the page CTRL+F5.
-
Thank you for watching this tutorial. Now you know how to remove Add To Compare option in Magento template(s).
Feel free to check the detailed video instruction below: