I want to add some changes in Magento 2 email order_totals.
I searched and found it
<tfoot class="order-totals">
<?= $block->getChildHtml('order_totals') ?>
</tfoot>
Where do I change it? Please help me
I want to add some changes in Magento 2 email order_totals.
I searched and found it
<tfoot class="order-totals">
<?= $block->getChildHtml('order_totals') ?>
</tfoot>
Where do I change it? Please help me
You can change the sort order of the totals by following the below path in the Magento admin.
Stores > Configurations > Sales > Sales > Checkout Totals Sort Order
If you want to change it only for the emails then you need to change the layout handle {{layout handle="sales_email_order_items" order=$order area="frontend"}}
described in the email template which contains /vendor/magento/module-sales/view/frontend/layout/sales_email_order_items.xml
file.
In this file, the total block is defined /vendor/magento/module-sales/view/frontend/templates/order/totals.phtml
. You can override it as per your requirements.
Ex. override theme:
app/design/frontend/Smartwave/porto_child/Magento_Sales/templates/order/totals.phtml
Hope it helps!!!