Magento – ” Add to Compare ” Remove from product and category / delete

(Current versions of Magento info below!) Who in his shop one can, to compare one product with another does not or will not have, this can be removed with a little effort.

On the one hand, there are in the categories, and in view of the product to Compare link but also in the navigation bar (left or right) comes from the comparison box.

Now you can remove the entries manually, by, in some files (view.phtml, list.phtml and other) the corresponding regions commented out or deleted. But this is a little more effort.

Therefore can be used on a small extension, which is HERE are.

This may be one, depending on the store view the comparison function- or off. Important: After the installation is by default the feature off firstonce!

After the extension is on it, be reliably removed the links. There remains only the “OR” exist, which out of context “Add to Cart OR Add to Compare” has remained.

This may be a little change of approximately view.phtml. in line 70 be changed.

There with <!– and –> comment out the function, so then it looks like:

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

(But ATTENTION: Now would also be allowed in the case of the comparison function that is missing OR! Therefore, always working template dependent!)

Now everything should be fine.

Supplement (24.06.2011):
In Magento 1.4 seems the module output disable (what a word) in the back of the comparison function to function for at least the Category View (System > Configuration > Catalog > Compare). In view of the article the link is still available.

For the removal of links in the article view in the folder /app / design / frontend /[base or default]/[IhrTemplate]/template/catalog/product/view and go where the file addto.phtml open. Here then

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

comment out or delete. (ATTENTION: If e.g.. be an extension as Amasty Favorite Products used, Also in the folder app / design / frontend / / bf / template / look amlist / rewrite. There, the o.g. File “overwritten”)

For manual removal of the link (View category) the file list.phtml in the folder app / design / frontend /[base or default]/IhrTemplate/template/catalog/product Open and then make changes in two places:

  1. As. from line 73
    <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
    <li><span>|</span> <a href="<?php echo $_compareUrlAdd to Compare’ ?>"><?php echo $this->__('Add to Compare') ?></a></li><?php endif; ?>

    comment out or delete.

  2. As. from line 111 the same game.

Then save and thus highly.

Used in 1.4.1.1

Addendum dated 12.08.2011

From ab Magento Version 1.5. The extension does not seem right (install and can also be done manually), here are the files involved, to remove the comparison links:

In Folder app / design / frontend /[base or default]/[Ihr Template]/template/catalog/product in the file list.phtml. Here is the link for the comparison function included in the category overview. And though at TWO locations. Therefore, make sure, that both are deleted or excluded.

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

This is about. in line 73 and again in 111.

For the removal of the article or. View the article in the same folder to the folder / view go / and the file addto.phtml open.

Who wants to remove only the compare function, commented the following area or deletes it from:

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

Who then the box “Compare” wants to remove from the left or right sidebar, which was once the file sidebar.phtml in the folder app / design / frontend /[base or default]/[Ihr Template]/template/catalog/product/compare look at. There is this.

In addition, and more beautiful (thus the o.g. Sidebar box file is not even loaded) but it is, when im in the catalog.xml layout directory ca. in line 57 der Code

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

is commented out or removed.

Used in Magento Version 1.5. and Revision 1.7. Ask? Suggestions? Comments? Gladly!

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

Leave a Reply

Your email address will not be published. Required fields are marked *