Disable “Add To Compare” in Magento 1.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; ?>

 

As the below example:

<!--commented     <?php// if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>

                                                                                                                <li><span class="separator">|</span> <a title="<?php //echo $this->__('Add to Compare') ?>" href="/<?php //echo $_compareUrl ?>" class="link-compare tooltips"><?php //echo $this->__('Add to Compare') ?></a></li>

                            <?php// endif; ?> -->

 

 

Do the same to addtophtml file. If the addto.phtml is missing then copy the addto.phtml from: \app\design\frontend\base\default\template\catalog\product\view

To: app/design/frontend/yourpackage/yourtheme/template/catalog/product/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; ?>

 

As the below example:

<!--commented

<?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; ?> -->

 

click here for video demo.

 


Print   Email

Related Articles