0

I am trying to remove Checkout link but it's not removing.

my code is:

magento\app\design\frontend\easylife\default\layout\local.xml

<?xml version="1.0" encoding="UTF-8"?>
<layout version="0.1.0">
    <default>

        <reference name="top.links">           
            <remove name="checkout.links"></remove>
        </reference>

        </default>

</layout>

can anyone tell me how can I do?

thanks.

  • Is the theme you're using set to be loaded in the Magento config, or is the local.xml the only file in your theme so far? – jesseconnr Feb 18 '14 at 16:21
1

Just Refer checkout.xml

<default>
        <!-- Mage_Checkout -->
        <reference name="top.links">
            <block type="checkout/links" name="checkout_cart_link">
                <action method="addCartLink"></action>
                <action method="addCheckoutLink"></action>
            </block>
        </reference>
</default>

You have to give correct name to remove the link or block

<?xml version="1.0" encoding="UTF-8"?>
    <layout version="0.1.0">
        <default>

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

            </default>

    </layout>
  • this is not working.. – Magento Nav Feb 18 '14 at 12:36
  • refer your checkout module xml file app/design/frontend/base/default/layout/checkout.xml – MeenakshiSundaram R Feb 18 '14 at 13:14
0

I ran into this same problem. I tried to remove it with local.xml, but I could figure out how to remove ONLY the "checkout" button, and not the "Cart" button (which tells you how many items you have in the cart.)

I ended up hiding it with CSS:

#header .top-link-checkout {display: none;}

For anyone interested in finding a true solution, the links are rendered by this template: frontend/base/default/template/page/template/links.phtml

The links are added to the menu by this block app/code/core/Mage/Checkout/Block/Links.php (See function "addCheckoutLink")

I can't see any way to "removeCheckoutLink" and thought that the CSS solution was easier than modifying core for something so simple.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.