Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 3
REMOVE “Add To Compare” Please Help! 
 
outtareach
Jr. Member
 
Total Posts:  22
Joined:  2009-01-02
 

I read 10 threads on how to remove the “Add to Compare” from the product page and I tried all of them and none worked.  It was still there so does anyone know how to remove this annoying feature from the latest build of Magento???

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravikumar N B
Sr. Member
 
Avatar
Total Posts:  213
Joined:  2009-01-12
 

I didnt find any configuration to disable the compare products module.
But we can build one new theme or modify few default templates then we can remove “COMPARE PRODUCTS” module.

* Remove right side Compare products box
Remove single line from magento/app/design/frontend/default/default/layout/catalog.xml Line: 59

<block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
* Remove Add to Compare link from below files
/magento/app/design/frontend/default/default/template/catalog/product/view/addto.phtml Line:35
/magento/app/design/frontend/default/default/template/catalog/product/new.phtml Line:54
/magento/app/design/frontend/default/default/template/catalog/product/list.phtml Line:78, 116
/magento/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml Line:49
/magento/app/design/frontend/default/default/template/reports/home_product_viewed.phtml Line:61
/magento/app/design/frontend/default/default/template/reports/home_product_compared.phtml Line:55
<a href="<?php echo $_compareUrl ?>"><?php echo $this->__('Add to Compare'?></a>

Any one have some other soultions???

 
Magento Community Magento Community
Magento Community
Magento Community
 
outtareach
Jr. Member
 
Total Posts:  22
Joined:  2009-01-02
 

thanks for trying but sorry it didnt work, this really sucks, anyone else?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravikumar N B
Sr. Member
 
Avatar
Total Posts:  213
Joined:  2009-01-12
 

This is working for me.
I think you are using some other themes to your website.
So change your theme template files.
magento/app/design/frontend/*/*t/template/catalog/product/view/addto.phtml

 
Magento Community Magento Community
Magento Community
Magento Community
 
outtareach
Jr. Member
 
Total Posts:  22
Joined:  2009-01-02
 

Im using blank theme, you know where I would go to change it in there?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ravikumar N B
Sr. Member
 
Avatar
Total Posts:  213
Joined:  2009-01-12
 

I dont knew, where blank theme related files are stored.
But all themes related file are store under
magento/app/design/frontend/

I think layout related files are located in

magento/app/design/frontend/default/blank/layout
or
magento/app/design/frontend/blank/blank/layout
template related files are located in
magento/app/design/frontend/default/blank/template
or
magento/app/design/frontend/blank/blank/template
 
Magento Community Magento Community
Magento Community
Magento Community
 
outtareach
Jr. Member
 
Total Posts:  22
Joined:  2009-01-02
 

took out all that stuff in both and its still there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kara Heinrichs
Guru
 
Avatar
Total Posts:  482
Joined:  2008-01-17
aa, mi, us
 

sorry, I have to ask, have you refreshed the cache (layouts and block output, especially)?  Ravikumar’s fixes should really work, especially removing the link from the phtml files.  Once the link is gone it can’t display even if it were still in the layout files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
DaemonOfChaos
Member
 
Total Posts:  35
Joined:  2008-08-18
Hendersonville, TN
 

I have to second kara’s suggestion. Be sure your cache is turned off while you are developing sites. This messed me up a *lot* when I would make a change to the files but not see a change in the store.

System > Cache Management > All Cache = Disable.

Once you are done with your changes and are ready to go live then enable the cache.

 
Magento Community Magento Community
Magento Community
Magento Community
 
skippybosco
Enthusiast
 
Avatar
Total Posts:  796
Joined:  2008-10-03
 

Might even suggest taking the extra step of deleting everything in the \magento\var\cache

 
Magento Community Magento Community
Magento Community
Magento Community
 
dhanashri
Jr. Member
 
Total Posts:  24
Joined:  2009-01-08
 

Hi quanghoc

Did you find a solution to the above problem . I am having the same problem, i cannot get rid of the community poll and the compare product link on the product details page. Also can somebody help me with changing the layout of the product details page. I am using the modern theme. I am getting 2 column left layout and don’t understand where I can change it to 2 coulum right or even 1-column.

Please help

I added the following line
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
in catalog.xml under <catalogue_product_view> but nothing seems to change the layout.

Thanks
Dee

 
Magento Community Magento Community
Magento Community
Magento Community
 
dhanashri
Jr. Member
 
Total Posts:  24
Joined:  2009-01-08
 

Can you please specify which template file is it view.phtml?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kara Heinrichs
Guru
 
Avatar
Total Posts:  482
Joined:  2008-01-17
aa, mi, us
 

Your setTemplate change to catalog.xml should work.  Just refresh the cache (ADMIN>System> Cache management).  The code is correct.

The product page phtml file is at app/design/frontend/yourInterface/yourTheme/catalog/product/view.phtml. The code line you have to mess with is:

<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
BarneyHall
Jr. Member
 
Total Posts:  26
Joined:  2009-03-09
 
kara - 30 March 2009 03:08 PM

The product page phtml file is at app/design/frontend/yourInterface/yourTheme/catalog/product/view.phtml. The code line you have to mess with is:

<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>

Anyone any idea how to seperate the “add to wishlist” from the “add to compare” option within the PHP statement above? Basically, so that only the “add to wishlist” link is visible and not the “add to compare” link.

I do not know PHP and have been stumbling why way through Magento.

Would really be appreciated thank you.. !

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kara Heinrichs
Guru
 
Avatar
Total Posts:  482
Joined:  2008-01-17
aa, mi, us
 

Right.  Unraveling the nested if statements here could get messy.

Instead, what it’s doing is calling an “Add to” page to create those links.  You can go directly to template/catalog/product/view/addto.phtml.  Comment out the add to compare code there. 

<!--
<?php if($_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product) ): ?>
   
<a href="<?php echo $_compareUrl ?>"><?php echo $this->__('add to compare'?></a>
<?php endif; ?>
-->

Back in view.phtml then you’d only have to comment out or delete the “OR” text that will show up on the page.  This line, I think:

<!-- <span class="add-or"><?php echo $this->__('OR'?></span> -->
 
Magento Community Magento Community
Magento Community
Magento Community
 
PeterHowitt
Jr. Member
 
Total Posts:  8
Joined:  2009-06-01
Gibraltar
 

see thread remove compare add to for complete removal of compare from add to:

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3