I am not sure if this has been asked before but I could not get anything much relevant when I tried to search about it. I want to add a new custom link on the shopping cart page along with the other existing links Update Shopping Cart and the Continue Shopping links.

enter image description here

I am having a custom module and I understand that I would need to override the core template but not sure on how exactly this should be done. Which is the template file that is responsible for displaying the other links or buttons?

Can anyone please help?


In a default installation, that template is


<?php if($this->getContinueShoppingUrl()): ?>
    <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Continue Shopping')) ?>" class="button btn-continue" onclick="setLocation('<?php echo Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl()) ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
<?php endif; ?>
<button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
<button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Clear Shopping Cart'); ?></span></span></button>

More info about overriding (or defining a new) a .phtml template in a module


In your case, your module custom layout should be something like this

    <reference name="checkout.cart"">         
        <action method="setTemplate">
  • How can I override it in my module? – manini Jan 5 '18 at 9:06
  • I update the answer with info about overriding templates in Magento... check it in a few minutes – Raul Sanchez Jan 5 '18 at 9:18

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.