How do I remove the “My Cart” and “Checkout” menu links in Magento?

user9903 picture user9903 · Apr 8, 2011 · Viewed 12.1k times · Source

I'm using Magento 1.4 and I want to remove the "Checkout" and "My Cart" links from the top navigation menu. I know I have to change something in a layout file but I'm not sure which one. I searched for "checkout" and "addLink" but found nothing related to those two links.

Answer

zokibtmkd picture zokibtmkd · Apr 10, 2011

The best way is to not touch the core layout files, instead your best bet is to create custom theme with only one layout file local.xml like described here To remove the links from the top menu you would need to add these lines in your local.xml file:

<default>
    <reference name="top.links">
        <remove name="checkout_cart_link" />
    </reference>
</default>

I believe this will remove the checkout and my cart links from the top menu. If this doesn't work, try changing top.links with topLinks since in page.xml it is declared as="topLinks"

    <reference name="topLinks">
        <remove name="checkout_cart_link" />
    </reference>