Gnanavel
Gnanavel

Reputation: 21

How to modify email invoice template?

I want to change email invoice template.

Where do I change the orders list and total amount?

What's the correct path?

I used the below path, but its not working. email/order/invoice/items.phtml

Upvotes: 1

Views: 4996

Answers (1)

ToxaBes
ToxaBes

Reputation: 1587

If you want to change template (structure), you need to do next:

  1. Go to System > Transaction Emails and click on "Add New Template" button
  2. Set options "Template"="New Invoice", "Locale"=your default locale, and click on "Load Template" button
  3. Set "Template Name" as "My New template for invoices"
  4. Change whatever you want in Template Content section. You can check your changes before saving by clicking in "Preview Template" button. Click "Save Template" button for savinf changes.
  5. Check what your new template selected in System > Configuration > Sales Emails > Invoice > Invoice Email Template.
  6. Repeat steps 1-5 for guest invoices.
  7. Clear the cache.

If you need to change totals, you should find correct template. As it shown in layout:

<sales_email_order_invoice_items>
    <block type="sales/order_email_invoice_items" name="items" template="email/order/invoice/items.phtml">
        <action method="addItemRender"><type>default</type><block>sales/order_email_items_default</block><template>email/order/items/invoice/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/invoice/default.phtml</template></action>
        <block type="sales/order_invoice_totals" name="invoice_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="tax/order/tax.phtml"/>
        </block>
    </block>
    <block type="core/text_list" name="additional.product.info" />
</sales_email_order_invoice_items>

invoice totals placed in sales/order/totals.phtml so you need to change this file or define own custom file instead this.

Upvotes: 3

Related Questions