Magento – How to i overwrite the summary block in magento2

checkoutknockoutjsmagento2

I am trying to override the checkout – summary block. I want add custom text after product name. I am not able to find way it is calling and fetching data.

I know it Knockout JS but i am not able to understand it in more detail. Can any tell me what is best way to customize the checkout.

Best Answer

Hey Bhupendra here answer for you,

You will need to override the template file for summery block using requirejs-config.js(create this file in your module`s view/frontend/requirejs-config.js)

var config = {
    map: {
        '*': {
             'Magento_Checkout/template/summary/cart-items.html':
          '<Vendor>_<ModuleName>template/summary/cart-items.html'
        }
  }
};

up vote if you are satisfied with answer. :)

Related Topic