How to add missing totals

For example I will use rewards points extension. There is possibility to use points as money. This extension are adding two new lines in order, invoice and credit memo totals block.

1. The first step is to copy layout xml file to our template directory:

From: /app/design/frontend/default/default/layout/mt/email.xml.
To: /app/design/frontend/YOUR/THEME/layout/mt/email.xml.

2. The second step is to find totals block in extension layout file. Your file could be different, I am using reward point extension just for example. Reward points layout's file is located here:

/app/design/frontend/base/default/layout/rewardpoints.xml

In your layout file should be totals' block code, similar like this:

<sales_email_order_items>
    <reference name="order_totals">
        <block type="rewardpoints/totals_order_point" name="rewardpoints.total.point" />
        <block type="rewardpoints/totals_order_label" name="rewardpoints.total.label" />
    </reference>
</sales_email_order_items>

We need to add these blocks to mtemail extension totals block.

<block type="rewardpoints/totals_order_point" name="rewardpoints.total.point" />
<block type="rewardpoints/totals_order_label" name="rewardpoints.total.label" />

3. Open the file

/app/design/frontend/YOUR/THEME/layout/mt/email.xml

and insert these lines

<block type="rewardpoints/totals_order_point" name="rewardpoints.total.point" />
<block type="rewardpoints/totals_order_label" name="rewardpoints.total.label" />

to this block

<block type="sales/order_creditmemo_totals" name="creditmemo_totals" template="sales/order/totals.phtml">
    <action method="setLabelProperties"><value>colspan="3" align="right" style="padding:3px 9px"</value></action>
    <action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action>
    <block type="tax/sales_order_tax" name="tax" template="totals/tax.phtml">
        <action method="setArea"><value>frontend</value></action>
    </block>
</block>

like this

<block type="sales/order_creditmemo_totals" name="creditmemo_totals" template="sales/order/totals.phtml">     <action method="setLabelProperties"><value>colspan="3" align="right" style="padding:3px 9px"</value></action>     <action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action>     <block type="tax/sales_order_tax" name="tax" template="totals/tax.phtml">         <action method="setArea"><value>frontend</value></action>     </block>  <block type="rewardpoints/totals_order_point" name="rewardpoints.total.point" />     <block type="rewardpoints/totals_order_label" name="rewardpoints.total.label" />     </block>

4. You have to repeat step 3 but add the lines to this file:

/app/design/adminhtml/default/default/layout/mt/email.xml

5. You have to repeat 2,3,4 steps with invoice and creditmemo totals. The example is only with order totals but the process is the same.