Magento – M2 | sales email > customize price display > how to show only grand totals

emailmagento2order-emailprice

I'm trying to style Magento's transactional emails.
I already managed it to edit and style the item display and included the item picture, but i haven't found a solution to only display the grandTotal price including tax and style it.

how to only display Grand Total and style it?

Customizing items was quite easy by creating an own /email/items/order/default.phtml. but I couldn't find a file, which generates the price display.

My Magento skills are quite basic. I would be glad for any advice as detailed as possible.

Best Answer

I haven't tested it but I think this might work:

Copy over Magento_Sales/view/frontend/templates/order/totals.phtml with the one line added like below:

<?php foreach ($block->getTotals() as $_code => $_total): ?>
    <?php if ($_code !== 'grand_total') continue; // add this line ?>

You should be able to add styling in this file as well.