How to remove 'Orders and Returns' from the footer?
I've updated a fresh Magento 1.5.0.1 installation to Magento 1.6.0.0, and now I've got a link in the footer, "Orders and Returns", that I can't figure (yet) how to remove that.
I can't remove it from the core files, I've tried the XML method but doesn't seems to work 开发者_开发知识库(probably my fault).
At the moment I can't even localize where the link is generated, as simple tests (like putting random words where the output should appear) never works.
Anyone got any suggestion or a solution about?
You could try:
<layout>
<default>
<reference name="return_link">
<!-- Set the template file to an empty string to prevent output -->
<action method="setTemplate">
<template></template>
</action>
</reference>
</default>
</layout>
Or in 1.7+:
<layout>
<default>
<reference name="footer_links">
<action method="removeLinkBlock">
<blockName>return_link</blockName>
</action>
</reference>
</default>
</layout>
Or, as mentioned by Rumble:
<layout>
<default>
<remove name="return_link" />
</default>
</layout>
One caveat about using remove element is that it would prevent the usage of that block name anywhere in the layout as it is converted into a global xpath selector.
Here the solution.
Since I needed to keep it theme related, I duplicated the layout sales.xml from app/design/frontend/base/default/layout/ to my theme layout folder (app/design/frontend/default/<name>/layout/) and commented out the <action>
element from following snippet:
<default>
<reference name="footer_links">
<block type="sales/guest_links" name="return_link"/>
<action method="addLinkBlock"><blockName>return_link</blockName></action>
</reference>
</default>
Enjoy!
There's a really simple way to remove this link. Add the following to your theme's local.xml
<default>
<remove name="return_link"/>
</default>
There's a good introduction to using local.xml here.
精彩评论