I want to add custom link in order summary on checkout page in magento. I have tried several options but doesn't work.

Is there any solution for this.

Like the following image: enter image description here

  • Have you got any solution for this as I am also struggling with this same issue? – Amrit Pal Singh Jul 19 '17 at 5:25
  • Not yet, I have implemented using jquery – Mandar Parbate Jul 24 '17 at 5:10
  • Have you any solution for the same issue @ Amrit Pal Singh. if yes please help me – SharadK Mar 16 '18 at 10:45

Question is too old but i am providing solution here so if someone have encountered this issue / requirement.

To add Edit link on cart summary block, you have to make changes in web/template/summary/cart-items.html file of Magento_Checkout :

Copy module-checkout/view/frontend/web/template/summary/cart-items.html and paste this in your Theme's Magento_Ccheckout/view/frontend/web/template/summary/cart-items.html.

And add below code block :

<div class="edit-summary">
    <span class="cart-summary-edit-link">
        <a class="action viewcart" data-bind="attr: {href: cartUrl}">
            <span data-bind="i18n: 'Edit Cart'"></span>

Where you want to add Cart summary link.

After making changes delete your var/view_processed/pub and pub/static/frontend folders and deploy static-content again.

NOTE : if you add this block within data-role=title div it will add the link but will not work as click event will not work on URL , because click event is being used for cart summary accordion ( open close ). solution is tested with Magento 2.2.2.

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.