How to properly remove Add to Compare

Hey guys I have spent hours reading people trying all kinds of different methods of how to properly remove the Add to Compare code and links from your magento site. What is the proper way to do it with the JM Sulfur template?

I have been able to just change the CSS code to say display none on the add-to-box but I would like to follow the following how to (to actually get rid of the code as well):

http://inchoo.net/ecommerce/magento/…on-in-magento/

However I cannot find certain files such as the:
app/design/frontend/default/Your Theme name/template/catalog/product/view/addto.phtml

Does that file just not exist anymore or is that only because this is the JM_Sulfure template?

Any answers to these questions is greatly appreciated. Thanks.

-parky

2 answers

jepourlevendetta 0.00 $tone November 21, 2009
Public

I did not find somewhere in Magento Admin to help for this. However, you can try it manually.

There are 3 files you need to modify in order to remove "Add to Compare" feature

../app/design/frontend/default/jm_sulfur/template/catalog/product/list.phtml
../app/design/frontend/default/default/template/catalog/product/view/addto.phtml
../app/design/frontend/default/jm_sulfur/template/catalog/product/compare/sidebar.phtml

Here we go!
Open file
../app/design/frontend/default/jm_sulfur/template/catalog/product/list.phtml

Search and remove: [This will remove the "Add to Compare" from products "List" view]

PHP Code:

                <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
                <span class="pipe">|</span>
                <a href="<?php echo $_compareUrl ?>"><?php echo $this->__('Add to Compare'?></a>
                <?php endif;?>


then search and remove: [This will remove the "Add to Compare" from products "Grid" view]

PHP Code:

                    <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?><br/>
                    <a href="<?php echo $_compareUrl ?>"><?php echo $this->__('Add to Compare'?></a>
                    <?php endif; ?>


Open file
../app/design/frontend/default/default/template/catalog/product/view/addto.phtml

Search and remove: [This will remove the "Add to Compare" from products details]

PHP Code:

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



And now, if you do not want to show the "Compare Products" at the side bar, just delete the following file content:
../app/design/frontend/default/jm_sulfur/template/catalog/product/compare/sidebar.phtml

Additional step:
There is an "OR" between "Add to Wishlist" and "Add to Compare" from product detail page. If you don’t want it to appear, open file
../app/design/frontend/default/jm_sulfur/template/catalog/product/view.phtml
then search and remove the following line:

PHP Code:

<span class="add-or"><?php echo $this->__('OR'?></span>


Done!

#1

This question is now closed

Written By

Comments