Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove 'Orders and Returns' from the footer?

Tags:

magento

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?

like image 936
Matteo Avatar asked Aug 25 '11 15:08

Matteo


2 Answers

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.

like image 175
Lee Saferite Avatar answered Nov 16 '22 21:11

Lee Saferite


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!

like image 7
Matteo Avatar answered Nov 16 '22 21:11

Matteo