Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable "Add To Compare" button in Magento

could you help me to disable "Add To Compare" button in magento ?

i want to remove add to compare, when hover the product ? and this is link of my site : http://dev.kesato.com/lepetitcartel

like image 645
Made Taman Avatar asked Mar 26 '15 07:03

Made Taman


3 Answers

The links above appear to be for v1.7. However, this worked for me in v1.9:

Open: app/design/frontend/yourpackage/yourtheme/template/catalog/product/list.phtml and remove or comment:

<?php if($_compareUrl=$this-getAddToCompareUrl($_product)): ?>
  <li><span class="separator">|</span> 
  <a  title="<?php echo $this->__('Add to Compare') ?> " href="<?php echo $_compareUrl ?>" rel="tooltip" class="link-compare "><?php echo $this->__('Add toCompare') ?></a></li>
<?php endif; ?>

Do the same to grid view.

Then, open: app/design/frontend/yourpackage/yourtheme/template/catalog/product/view/addto.phtml and remove or comment:

<?php
$_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
?>
<?php if($_compareUrl) : ?>
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>-->
<?php endif; ?>

Lastly, open: app/design/frontend/yourpackage/yourtheme/layout/catalog.xml and remove or comment:

<block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/></block>

Save and clear cache.

like image 71
Chris Roberts Avatar answered Oct 22 '22 05:10

Chris Roberts


An easy way to disable the wishlist, without the need to touch any code is in the backend: system_config/edit/section/advanced

Configuration / Advanced / Advanced

just find Mage_Wishlist near the bottom of the list and choose disable and Save Config

like image 3
user15020 Avatar answered Oct 22 '22 04:10

user15020


There are many ways to axe the compare products functionality in different places of your site.

http://www.aschroder.com/2009/07/removing-the-compare-function-in-magento-the-easy-way/

http://inchoo.net/magento/removing-product-comparison-in-magento/

like image 1
Vladimir Ramik Avatar answered Oct 22 '22 04:10

Vladimir Ramik