Magento 1.8 – How to Exclude Shipping Tax in Grand Total

grand-totalinvoicemagento-1.8shippingtotals

I'm stuck trying to exclude the shipping cost from the order-totals table in the invoice email.

At the moment, the invoice email looks like this: (I included a little translation for the most important fields)

current result

As you can see: the grand total (15.80€) includes the shipping tax (6.20€).

Is it possible (and if, how) to change the grand total to exclude the shipping cost?

I've made a small mockup below:

required result

Do I need to edit template files? Or should I target the GrandTotal calculation in the model?

I'm using Magento 1.8.

I very much appreciate any help regarding this issue. 🙂

Best Answer

usually we do in the following way

do a local ovveride of app/code/core/Mage/Checkout/Block/Cart/Totals.php

and look for the function

public function renderTotal($total, $area = null, $colspan = 1)
{
    $code = $total->getCode();
    if ($total->getAs()) {
        $code = $total->getAs();
    }
    if($code == 'code_to_skip')
        return(''); //does not rendere the unwanted total row
    return $this->_getTotalRenderer($code)
        ->setTotal($total)
        ->setColspan($colspan)
        ->setRenderingArea(is_null($area) ? -1 : $area)
        ->toHtml();
}    

this is the function that renders the totals to html check the $code by logging them and skip the unwanted one

hope this help

Related Topic