Very much a newbie to Magento (and to php programming also), one of the first things I wanted was to switch off the Product Compare feature, and all the related artefacts that appear in the site, which lead me to this thread (#3405). Most of the proposed solutions were pretty much one-way mods, so I used the opportunity to develop a switchable solution instead.
It turns out that there are several files affected - so this took a little longer than expected, but I believe the result is now pretty much OK.
You can find the details in the attached ZIP file, including sample files (based on the default template) and an explanatory Word document
*** WARNING - the solution includes a manual data entry to database and modifies one core code file ***
Before you panic – this is still utilising standard functionality of Magento, so should not break anything (and I have tested it a bit also), but it does mean that the solution may become redundant in a future release of the product. Until then, the following solution will work just fine! (Naturally, I present the code as-is, with no claims that it is anyhting other than a
I welcome your comments - and if anyone in the Core Team finds it useful enough to add as a more “permanent” package, then so much the better!
I have made module which hides prices when not logged in and hides Add to compare links although the laouts should be modified by hand to not show compare options… the code is hosted here: http://code.google.com/p/magentohideprice/ u don’t need to modify any of core or template files to hide Add to compare link so I think it is good solution for those who don’t keen in coding, there is only one thing this module hides prices if not logged in… in future plans there is a backend where u may turn on off features. It is still in early beta but I believe that someday I’ll release it as stable :D
I have made module which hides prices when not logged in and hides Add to compare links although the laouts should be modified by hand to not show compare options… the code is hosted here: http://code.google.com/p/magentohideprice/ u don’t need to modify any of core or template files to hide Add to compare link so I think it is good solution for those who don’t keen in coding, there is only one thing this module hides prices if not logged in… in future plans there is a backend where u may turn on off features. It is still in early beta but I believe that someday I’ll release it as stable :D
Is it possible to use this just to hide the add to compare link? Thanks!
I have made module which hides prices when not logged in and hides Add to compare links although the laouts should be modified by hand to not show compare options… the code is hosted here: http://code.google.com/p/magentohideprice/ u don’t need to modify any of core or template files to hide Add to compare link so I think it is good solution for those who don’t keen in coding, there is only one thing this module hides prices if not logged in… in future plans there is a backend where u may turn on off features. It is still in early beta but I believe that someday I’ll release it as stable :D
We’re using the Modern theme with Magneto v.1.0.19870 ... the module has hidden the price and the compare link in the product however it has left the left hand side ‘compare products’ box ? ... any idea how to get rid of that left hand side box ?
Update: The price on the product details is hidden when not logged in however the ‘filter by price’ remains active when not logged in ... which I assume shouldn’t when by using this module you don’t want a consumer seeing any pricing information until they log in.
Thanks for this, it worked great! Just a quick note…
dax - 30 April 2008 03:20 PM
*** WARNING - the solution includes a manual data entry to database and modifies one core code file ***
This isn’t strictly true. If you copy the Compare.php file to the app/code/local/ folder then you can leave the originally app/code/core/ file in tact (and the changes will still apply).
Looking forward to an admin frontend… I may have to get on that if no-one else does!
I also am looking for a way to remove it in 1.1.3, if only to compliment a more minimalistic design. I’ve tried commenting out the relevant lines in the layout xml, but it didn’t seem to have any effect. It may also be called explicitly elsewhere but I haven’t had a chance to sniff out all the offending areas.
No solution for new versions yet.... they have changed the way prices shows up in catalog at the moment I can not figure out how do they do this… any ideas… magento team…
I modified the phtml file where the compare box is printed out. If there is anything to compare (collection count > 0) then it prints the box, otherwise it doesn’t.
But this doesn’t take out all the links to Add to Compare if you don’t want the functionality at all. And they are in a lot of template files.
I was changing them to have “nofollow”, so I was thinking “Why isn’t there one function for this, so all could be changed in one place?”
Hide price update for magento 1.1.4 not fully tested :D http://code.google.com/p/magentohideprice here u go they changed the way they output prices so I needed to overlook some code… and I haven’t found time before