Matteo
Matteo

Reputation: 1209

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?

Upvotes: 6

Views: 20144

Answers (3)

Lee Saferite
Lee Saferite

Reputation: 3124

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.

Upvotes: 14

Rumble
Rumble

Reputation: 142

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.

Upvotes: 0

Matteo
Matteo

Reputation: 1209

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!

Upvotes: 7

Related Questions