Magento Forum

   
Removing add to compare and add to wishlist buttons
 
Boatmagic
Sr. Member
 
Avatar
Total Posts:  91
Joined:  2010-08-14
 

Here is the simplest way I’ve found so far.
In file /mytheme/default/template/catalog/product/list.phtml

Comment this out

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

And, comment this code out in mytheme/default/template/catalog/product/compare/sidebar.phtml

<!--<?php 
$_helper 
$this->helper('catalog/product_compare');
$_items $_helper->getItemCount() > $_helper->getItemCollection() : null;
?>
<div class="block block-list block-compare">
    <
div class="block-title">
        <
strong><span><?php echo $this->__('Compare Products'?>
            <?php 
if($_helper->getItemCount() > 0): ?> 
                
<small><?php echo $this->__('(%d)'$_helper->getItemCount()) ?></small>
            
<?php endif; ?>
        
</span></strong>
    </
div>
    <
div class="block-content">
    
<?php if($_helper->getItemCount() > 0): ?>
        
<ol id="compare-items">
        
<?php foreach($_items as $_index => $_item): ?>
            
<li class="item">
                <
input type="hidden" class="compare-item-id" value="<?php echo $_item->getId() ?>" />
                <
a href="<?php echo $_helper->getRemoveUrl($_item) ?>" title="<?php echo $this->__('Remove This Item') ?>" class="btn-remove" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the compare products?') ?>');"><?php echo $this->__('Remove This Item'?></a>
                <
class="product-name"><a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item$_item->getName(), 'name'?></a></p>
            </
li>
        
<?php endforeach; ?>
        
</ol>
        <
script type="text/javascript">decorateList('compare-items')</script>
        
<div class="actions">
            <
a href="<?php echo $_helper->getClearListUrl() ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>');"><?php echo $this->__('Clear All'?></a>
            <
button type="button" title="<?php echo $this->__('Compare') ?>" class="button" onclick="popWin('<?php echo $_helper->getListUrl() ?>','compare','top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes')"><span><span><?php echo $this->__('Compare'?></span></span></button>
        </
div>
    
<?php else: ?>
        
<class="empty"><?php echo $this->__('You have no items to compare.'?></p>
    
<?php endif; ?>
    
</div>
</
div>-->

 
Magento Community Magento Community
Magento Community
Magento Community
 
Boatmagic
Sr. Member
 
Avatar
Total Posts:  91
Joined:  2010-08-14
 

To remove the sidebar that says Compare Products and also Recent Products Viewed

In file app/design/frontend/mytheme/default/layout/reports.xml

<!--<reference name="right">
            <
block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
            <
block type="reports/product_compared" before="right.permanent.callout" name="right.reports.product.compared" template="reports/product_compared.phtml" />
        </
reference>-->

Hope this helps someone else.

 
Magento Community Magento Community
Magento Community
Magento Community
 
WebFlakeStudio
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2010-05-06
 

If you want completely remove compare products functionality, you can use this free extension http://www.magentocommerce.com/magento-connect/catalog/product/view/id/16044/

 
Magento Community Magento Community
Magento Community
Magento Community
 
niro
Mentor
 
Avatar
Total Posts:  1592
Joined:  2009-03-04
Latvia, Riga
 

Wishlist can be disabled in admin (System - Configuration - Advanced - Disable Modules Output)

Compare functionality can be removed by free extension Advanced Compare (http://www.magentocommerce.com/magento-connect/et-advanced-compare.html)

 
Magento Community Magento Community
Magento Community
Magento Community
 
fbal
Jr. Member
 
Total Posts:  1
Joined:  2013-06-17
 

Version 1.7.02 In order to reduce sweat, feed your

local.css
file instead.

First, add style to the add-to-links <div>:

.add-to-links {displaynone}
Notice that you also removed the vertical line between the Add to Wishlist and Add to Compare link.

Next, we continue to style your theme\’s

local.css
and hide the or <div> in the Product View display:

.add-to-box .or {displaynone}
If you now refresh the frontend of your sandbox store, you\’ll see these changes take effect.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top