0

I want to change my checkout link in the top links on my magento site to go to the basket instead of the checkout process.

I have found ways of just removing the links via XML files but no document son editing where the link takes you.

So the clarify i need to change the top link "checkout" to take the customer to the basket and not the checkout process. Can anyone help?

2

The link target is set in the Mage_Checkout_Block_Links::addCheckoutLink() method.

$parentBlock->addLink(
    $text, 'checkout', $text,
    true, array('_secure' => true), 60, null,
    'class="top-link-checkout"'
);

The code above add the link to "checkout". You can rewrite this class and method to change the behavior...

...or...

you can change in your checkout.xml layout the call

<reference name="top.links">
    <block type="checkout/links" name="checkout_cart_link">
        <action method="addCheckoutLink"></action>
    </block>
</reference>

became

<reference name="top.links">
    <block type="checkout/links" name="checkout_cart_link">
        <action method="addCartLink"></action>
    </block>
</reference>
  • I tried the XML file solution but it didnt seme to work. Also when i completely delete <reference name="top.links"> from the XML file the link still appearso n the fornt end? – Adam Allen Mar 24 '15 at 12:45
  • Have you tried to flush the cache after each edit ? – Pilou Mar 24 '15 at 13:47

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.