Disable the Add to Compare button in Magento

Could you help me disable the Add To Compare button in purple?

I want to remove add for comparison when I hover over a product? and this is my website link: http://dev.kesato.com/lepetitcartel

+4
source share
7 answers

The above links for v1.7. However, this worked for me in version 1.9:

Open: app / design / frontend / yourpackage / yourtheme / template / catalog / product / list.phtml and delete 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 with the grid.

: //frontend/yourpackage/yourtheme/template/catalog/product/view/addto.phtml :

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

, : //frontend/yourpackage/yourtheme/layout/catalog.xml :

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

.

+6

, - , : system_config/edit/section/advanced

//

Mage_Wishlist "" " "

+2

~/app/code/core/////Compare.php ~///​​/Mage//Helper/Product/Compare.php

:

Goto 165 Line Just Change as Follow, Compare Option

public function getAddUrl($product)
    {
        if ($this->_logCondition->isVisitorLogEnabled() || $this->_customerSession->isLoggedIn()) {
           return $this->_getUrl('catalog/product_compare/add', $this->_getUrlParams($product));

        }
        return '';
    }

 public function getAddUrl($product)
    {
        if ($this->_logCondition->isVisitorLogEnabled() || $this->_customerSession->isLoggedIn()) {
            //return $this->_getUrl('catalog/product_compare/add', $this->_getUrlParams($product));
            return false;
        }
        return '';
    }
+1

" " , , .

app/design/frontend/<theme>/default/template/catalog/product/list.phtml

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

.

, .

0

view.phtml app/design/frontend/yourpackage/yourtheme/template/catalog/product/list.phtml

:

            <!--    <div class="add-to-box add-to-box1">
                    <div class="actions-inner">
                        <?php echo $this->getChildHtml('addto') ?>
                        <?php if ($this->canEmailToFriend()): ?>
                        <ul class="add-to-links">
                            <li>
                                <a class="email-friend fa fa-envelope" title="<?php echo $this->__('Email to a Friend') ?>" href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><span><?php echo $this->__('Email to a Friend') ?></span></a>
                            </li>
                        </ul>
                        <?php endif; ?>
                    </div>  
                </div>

                -->

, , , sagar.career1122@gmail.com

@sagar

0

, ... Rindex magento admin, , INDEX MANAGEMENT, , , rindex.. ..OOHLA !!

-1

All Articles