Categories

Featured templates

Magento. How to disable compare products feature

Ray Taylor February 10, 2015
Rating: 5.0/5. From 4 votes.
Please wait...

In this tutorial you will learn how to remove Add To Compare option in Magento template(s).

Magento. How to disable compare products feature

magento-remove_add_to_compare1

  1. 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:

    magento-remove_add_to_compare2

  2. You will need to remove “add to compare” option from product list view and/or product grid view.

  3. Using CTRL+F search tool locate and remove the following code:

    
      
  4. | __('Add toCompare') ?>
  5. You can remove the code or comment it out using two forward slash punctuation marks for PHP: //

  6. For HTML you can use the following punctuation marks:

  7. Do the same to alter items in a grid view.

  8. 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);
    ?>
    
    
  9. | __('Add to Compare') ?>
  10. -->
  11. 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:

    
    
  12. Save your changes and upload to the server replacing the original files.

  13. Please note that you may need to clean Magento and Browser cache to see the changes:

    1. Go to your_domain_name.com/index.php/admin;

    2. Select System>Cache Management;

    3. In Cache Control box check all options and in All Cache dropdown select Refresh;

    4. 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:

Magento. How to disable compare products feature

Magento Ecommerce Themes
This entry was posted in Magento Tutorials and tagged compare, disable, Magento, product. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket