When I activate coupon code on my webshop, create an order, and generate PDF invoice, bsed on my configuration settings I get totals like:

Price of the product Excl tax 
Price of the product Incl tax 
Price for shipping Excl tax 
Price for shipping Incl tax 
Tax for product 
Tax for shipping 
Grand total 

What I need now is to display two more stuffs on the totals: 1) Price of the product with included discount (Excl tax) 2) Price of the product with included discount (Incl tax)

Is there a way to call this two values from my order on PDF invoice totals?

1 Answer 1


There is a discount_amount total type in the config, and you can inject custom totals using some configuration XML (and a custom totals renderer if there isn't one):


            <!-- ... -->
            <discount translate="title">

You can follow this pattern to implement your own total type, and if you specify a <model> node that class will be used to calculate/generate the output. These totals nodes are parsed in Mage_Sales_Model_Order_Pdf_Abstract::_getTotalsList(). Note that these are for order totals, not for individual item lines. Individual line items are parsed from the same area of config:


        <!-- ... -->

So, it's possible to override the original via config or to do a standard Magento class rewrite to generate the content you need.

Your Answer

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

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