I want to add link on the product which is showing in order summary on checkout page.

I have found HTML code in the file:



<div class="product-item-name-block">
            <strong class="product-item-name" data-bind="text: $parent.name"></strong>
            <div class="details-qty">
                <span class="label"><!-- ko i18n: 'Qty' --><!-- /ko --></span>
                <span class="value" data-bind="text: $parent.qty"></span>

How to add href for the product name?

  • did you find a solution to this? – zekia Jan 2 at 10:35
  • No, didn't get any solutio. Even I didn't try after that. – Vinod Kumar Jan 3 at 7:42

You need plugin for for class for class


On your plugin class ,you need pass product url as parameter of json object which is used at checkout summary

Please follow the folder and file from the blog http://www.blogtreat.com/magento-2-display-custom-product-attribute-checkout-summary/

Then you need to some changes at

$result['quoteItemData'][$index]['brand'] = $product->getResource()->getAttribute('brand')->getFrontend()->getValue($product);


$result['quoteItemData'][$index]['url'] = $product->getProductUrl().

Also on new summary.html you need to put url

<strong class="product-item-name" data-bind="text: $parent.name"></strong>
  • Hi, I have tried this but after that checkout is not working. – Vinod Kumar Mar 28 '18 at 6:16
  • Okay, i will look on it – Amit Bera Mar 28 '18 at 7:14
  • <strong class="product-item-name" data-bind="text: $parent.name"></strong> how to pass URL? – Vinod Kumar Mar 28 '18 at 9:12
  • have you got anything? – Ketan Borada Apr 26 '18 at 11:08
  • how to add custom phtml page link in checkout page..please help me.. if i am clicking that it have to redirect to another page – SUBBULAKSHMI G Oct 29 '18 at 13:33

It is working.

In details.js I replaced

getBrand: function(quoteItem) {
    var item = this.getItem(quoteItem.item_id);
    return item.brand;


getUrl: function(quoteItem) {
    var item = this.getItem(quoteItem.item_id);
    return item.url;

In details.html file changed the

<strong class="product-item-name" data-bind="text: $parent.name"></strong>


<a target="_blank" data-bind="attr: { href: getUrl($parent) }">
    <strong class="product-item-name" data-bind="text: $parent.name"></strong>

and removed the code

<!-- ko if: (getBrand($parent)) -->
<div class="product-item-brand">
    <span class="label"><!-- ko i18n: 'Brand:' --><!-- /ko --></span>
    <span class="value" data-bind="text: getBrand($parent)"></span>
<!-- /ko -->
  • I tried your solution but didn't work. item.url is null/undefined. – zekia Jan 2 at 12:02

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.