
Not applicable

Not applicable
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019
09:53 PM
01-16-2019
09:53 PM
Hello,
Where exactly in the code are those functions which get the totals (subtotal, shipping, tax and order total) from the checkout page, summary section?
I found the .html files such as grand-total.html, with the following code, but where is the function exactly? From where it tries to get the value (getValue())?
<!-- ko if: isDisplayed() -->
<tr class="grand totals">
<td class="mark" scope="row">
<strong data-bind="i18n: title"></strong>
</td>
<td class="amount" data-bind="attr: {'data-th': $t(title)}">
<strong><span class="price" data-bind="text: getValue()"></span></strong>
<!-- ko foreach: elems() -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
I want to format the price for all those prices: remove the comma or point separator and add the decimals between a <sup> tag.
Thanks.
Where exactly in the code are those functions which get the totals (subtotal, shipping, tax and order total) from the checkout page, summary section?
I found the .html files such as grand-total.html, with the following code, but where is the function exactly? From where it tries to get the value (getValue())?
<!-- ko if: isDisplayed() -->
<tr class="grand totals">
<td class="mark" scope="row">
<strong data-bind="i18n: title"></strong>
</td>
<td class="amount" data-bind="attr: {'data-th': $t(title)}">
<strong><span class="price" data-bind="text: getValue()"></span></strong>
<!-- ko foreach: elems() -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->
</td>
</tr>
<!-- /ko -->
I want to format the price for all those prices: remove the comma or point separator and add the decimals between a <sup> tag.
Thanks.
Solved! Go to Solution.
Labels:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019
05:01 AM
01-17-2019
05:01 AM
You can get the function of getValue() from JS file.
Your location would be from Checkout Module,
vendor/magento/module-checkout/view/frontend/web/js/view/summary/grand-total.js
getValue: function () { return this.getFormattedPrice(this.getPureValue()); }
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial
Magento 2 Blogs/Tutorial
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019
05:01 AM
01-17-2019
05:01 AM
You can get the function of getValue() from JS file.
Your location would be from Checkout Module,
vendor/magento/module-checkout/view/frontend/web/js/view/summary/grand-total.js
getValue: function () { return this.getFormattedPrice(this.getPureValue()); }
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial
Magento 2 Blogs/Tutorial

Not applicable

Not applicable
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2019
07:17 AM
01-21-2019
07:17 AM
Re: Code location for the functions for summary totals
Thanks! It's working. Also, during checkout I had to run through different modules to take care of all prices, such as Magento_Weee and Magento_Tax.