The top links for Magento include the following

My Account My Wishlist Checkout and Login

When Checkout is clicked, it takes you to Checkout page.

I would like it when Checkout is clicked, it takes you to My Cart or the Shopping Cart page.

How can this be done?



Magento top link is coming from class Mage_Checkout_Block_Links on function


  • You need rewrite this class

<global> ... <blocks> <checkout> <rewrite> <links>Amit_CustomCheckout_Block_Checkout_Link</links> </rewrite> </checkout> </blocks> ... </global>

  • and need to modify code of addCheckoutLink();

public function addCheckoutLink() { if (!$this->helper('checkout')->canOnepageCheckout()) { return $this; }

    $parentBlock = $this->getParentBlock();
    if ($parentBlock && Mage::helper('core')->isModuleOutputEnabled('Mage_Checkout')) {
        $text = $this->__('Checkout');

  $url='CustomUrl'; // with format routeridenfier/controller/Action
            $text, $url, $text,
            true, array('_secure' => true), 60, null,
    return $this;
  • for someone well versed in magento and its workings, this may seem easy, however i need to know what files to edit to achieve this. I really appreciate your answering the question. a really detailed step by step would be great! Sorry , i am learning every day! – Matt Godwin Aug 12 '15 at 4:35

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.