7

How can I change the position of the order totals (incl. tax / excl. tax) in the tax calculation? As it should show the total including tax below the total excluding tax but at the moment it does not.

screenshot

2

Other than the single totals (subtotal, tax, shipping, discount) which you can reorder in Stores > Configuration > Sales > Sales > Checkout Totals Sort Order, the grand totals are hard coded in the template

Magento/Tax/view/frontend/web/template/checkout/cart/totals/grand-total.html

<tr class="grand totals incl">
    <th class="mark" scope="row">
        <strong data-bind="i18n: inclTaxLabel"></strong>
    </th>
    <td data-bind="attr: {'data-th': inclTaxLabel}" class="amount">
        <strong><span class="price" data-bind="text: getValue()"></span></strong>
    </td>
</tr>
<tr class="grand totals excl">
    <th class="mark" scope="row">
        <strong data-bind="i18n: exclTaxLabel"></strong>
    </th>Magento/Tax/view/frontend/web/template/checkout/summary/grand-total.html
    <td data-bind="attr: {'data-th': exclTaxLabel}" class="amount">
        <strong><span class="price" data-bind="text: getGrandTotalExclTax()"></span></strong>
    </td>
</tr>

Override this template in your theme and change the order of these two <tr> table rows.

This template is for the cart. For the checkout summary, do the same in Magento/Tax/view/frontend/web/template/checkout/summary/grand-total.html

  • Hi thanks for that quick reply, where do i find this coding page? – Harley Kisberg Sep 14 '16 at 10:35
  • for magento 2 right? – Harley Kisberg Sep 14 '16 at 10:38
  • The files are either in app/code/Magento/Tax/view/... or vendor/magento/module-tax/view/..., depending on your type of installation. But you should never change core files directly. Instead, copy them to your theme and modify them there. You can learn about template overriding and custom themes here: devdocs.magento.com/guides/v2.1/frontend-dev-guide/templates/… – Fabian Schmengler Sep 14 '16 at 10:40

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.