Installed Version of Magento is - 2.1.0
I have added a custom field "Bank Account Number" as you can see red square box in the below image.
The problem I am facing is that it's not getting displayed in the summary as shown in below image.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityInstalled Version of Magento is - 2.1.0
I have added a custom field "Bank Account Number" as you can see red square box in the below image.
The problem I am facing is that it's not getting displayed in the summary as shown in below image.
The next template is responsible for rendering this summary block:
module-checkout/view/frontend/web/template/shipping-address/address-renderer/default.html
How to override:
app/design/frontend/YourTheme/default/Magento_Checkout/web/template/shipping-address/address-renderer/default.html
Create app/code/YourNamespace/YourModule/view/frontend/requirejs-config.js
in the module that is dependent on Magento_Checkout (has Magento_Checkout in sequence in module.xml) with the following content:
var config = {
map: {
'*': {
'Magento_Checkout/js/view/shipping-address/address-renderer/default': 'YourNamespace_YouModule/js/view/shipping-address/address-renderer/default'
}
}
};
And create corresponding template file in your module.
See more information about template customization in Magento 2 Frontend Development Guide
How to render address attribute:
Address attribute in this particular block should be rendered by knockout.js, here is the basic example of syntax to render the attribute string:
<!-- ko text: address().yourattribute --><!-- /ko -->
See more information about knockout.js rendering in Knockout.js documentation.