2

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. :)

2 Answers 2

2

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

2
  • Does this file also render the totals in the magento invoice emails? Jun 17, 2014 at 13:14
  • the above is for the cart, you should look into app\code\core\Mage\Sales\Block\Order
    – Giuseppe
    Jun 17, 2014 at 14:33
0

Go To

System > configuration

In the left sidebar

Sales > Shipping Methods :

Enable Free Shipping and disable the one's that are not required

4
  • I can't disable it unfortunately. :( I just want to change the position of "Shipping" in the order mail. I don't know where it magento generates the HTML for the order-email totals table. Jun 17, 2014 at 11:53
  • magento\app\design\frontend\base\default\template\checkout\onepage\review\info.phtml : This is where the design come from Jun 17, 2014 at 12:03
  • I checked it. It's the table on the onepage-checkout. I tried to edit it but the order email still looks the same. :( Jun 17, 2014 at 12:11
  • I am sorry, you want to remove this from code? Or from cart step? Do you need shipping, or you just want to comment the code fromwhere it is coming? Jun 17, 2014 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.