0

Is it possible to include tax in the subtotal and shipping totals on a Magento order email?

The list of items includes tax in the price, and my store settings are set to include tax on all prices, but for some reason on the order email the subtotal and shipping are excluding tax with tax added later.

Image attached to show the totals block. This is for a product that costs £1 including 20% VAT and shipping that costs £0.95 including VAT. The grand total includes the tax, but I can't figure out how to show subtotal and shipping inclusive of tax.

enter image description here

1

Please check file

app/design/frontend/base/default/template/sales/order/totals.phtml

Subtotal does not include tax initially, but you can add it for displaying, something like:

<?php foreach ($this->getTotals() as $_code => $_total): ?>
<?php if ($_code == 'subtotal'){$_total->setValue($_total->getValue()+$this->getOrder()->getTaxAmount());} ?>
<?php if ($_total->getBlockName()): ?>
    <?php echo $this->getChildHtml($_total->getBlockName(), false); ?>
<?php else: ?>
<?php if ($_code == 'shipping') continue; ?>
<tr class="<?php echo $_code?>">
    <td <?php echo $this->getLabelProperties()?>>
        <?php if ($_total->getStrong()):?>
        <strong><?php echo $this->escapeHtml($_total->getLabel());?></strong>
        <?php else:?>
        <?php echo $this->escapeHtml($_total->getLabel());?>
        <?php endif?>
    </td>
    <td <?php echo $this->getValueProperties()?>>
        <?php if ($_total->getStrong()):?>
        <strong><?php echo $this->formatValue($_total) ?></strong>
        <?php else:?>
        <?php echo $this->formatValue($_total) ?>
        <?php endif?>
    </td>
</tr>
<?php endif?>
0

Try under Configuration > Settings > Stores > Sales > Tax. There are various settings that determine how tax calculations are computed and displayed on Shopping Cart and Invoices...at least on Enterprise Edition. Choices on CE might be more limited but this section would be the place to look.

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.