Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

How to disable the Compare products functionality

  1. #1
    Administrator david's Avatar
    Join Date
    Nov 2012
    Posts
    261
    Thanks
    22
    Thanked 42 Times in 34 Posts

    Lightbulb How to disable the Compare products functionality

    You can disable the Compare products functionality in Magento by following these steps:


    • Edit app/code/core/Mage/Catalog/Helper/Product/Compare.php and change the following code:

    public function getAddUrl($product)
    {
    return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product));
    }

    to

    public function getAddUrl($product)
    {
    //return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product)); return false;
    }

    • Edit ./app/design/frontend/base/default/layout/catalog.xml (if you are using a different Magento theme, enter its name instead of default) and change the following code:


    to


    • Flush the Magento cache from your Magento admin area > System > Cache Management.

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Nov 2019
    Posts
    117
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    To disable Compare functionality, there's no option within the administration. You need to override the module-catalog/view/frontend/templates/product/listing. Phtml template. To eliminate the "Add to examine" link at the product web page you want to overwrite the Magento_Catalog/templates/product/view/addto.


    Official Hoverboards | Buy Hoverboard UK | Segway Hoverboard | Buy Hoverboard UK | Swegway for Sale UK | Segway for Sale | Hoverboards for Sale | Seat For Hoverboards | Hovercart For Sale | Hoverboard Hoverkart | Hoverboard Go Kart UK | Hoverboards for Kids

Similar Threads

  1. Replies: 2
    Last Post: 20-06-2013, 02:37 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •