3

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

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

2 Answers 2

2

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>
        </a>
    </span>
</div>

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.

0

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

Remove the condition from View and Edit cart div

<div class="actions-toolbar" >
<div class="secondary">
    <a class="action viewcart" data-bind="attr: {href: cartUrl}">
        <span data-bind="i18n: 'View and Edit Cart'"></span>
    </a>
</div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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