Reputation: 109
I am having a requirement that I have to change the order of totals in a shopping cart in Magento. My requirement is shipping charge should display before Tax. Currently it is displaying as Subtotal-Tax-shipping charge-Grand Total and I need as Subtotal-shipping charge-Tax-Grand total. Can anyone help me from where I can edit this.
Upvotes: 5
Views: 10808
Reputation: 411
you can change order in admin site Admin -> Stores -> Settings -> Configuration -> Sales -> Sales -> Checkout Totals Sort Order
but can't change Order Total Excl. Tax and Order Total Incl. Tax if you won't change it order to Order Total Incl. Tax and Order Total Excl. Tax please overide Magento_Tax module web/template/checkout/summary/grand-total.html same as
<tr class="grand totals excl">
<th class="mark" scope="row">
<strong data-bind="i18n: exclTaxLabel"></strong>
</th>
<td data-bind="attr: {'data-th': exclTaxLabel}" class="amount">
<strong><span class="price" data-bind="text: getGrandTotalExclTax()"></span></strong>
</td>
</tr>
<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>
Upvotes: 0
Reputation: 899
No need to change any code.
Just configure it from admin panel: Go to System->Configuration->Sales->Checkout Total Sort Order.Set the sorting order as you wish.
Upvotes: 0
Reputation: 1040
You can configure it in the Magento backend itself. Go to System->Configuration->Sales->Checkout Total Sort Order.Set the sorting order as you wish.
Upvotes: 12