Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editing Magento order confirmation email

I am looking to edit the block of the email that contains the order totals (shipping, grand total), but cant find the template file for this bit of code

I need to remove shipping and grand total lines, only showing subtotal lines

I have checked the template via System > Transnational Emails Looked at a large group of phtml files trying to find this specific instance (will be for both registered and unregistered users if this makes a difference)

currently the email is formatted as:

[logo]
hello {name/guest}
thank you message, {email} {tel}
order id info and date
billing info / payment method
shipping info / shipping method

order details - assuming this is {{layout handle="sales_email_order_items" order=$order}}

thank you message

on the order details line its a table

line item for each: item, sku, qty, subtotal

after all of the items is subtotal, then next line is shipping, then next line is total - it is 2 of those lines i want to get rid of, shipping and either subtotal or total

like image 327
Kender Avatar asked Mar 21 '23 13:03

Kender


2 Answers

In sales.xml layout, there is sales_email_order_items which is responsible for order items and contains

 <block type="sales/order_totals" name="order_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">
                <action method="setIsPlaneMode"><value>1</value></action>
            </block>
        </block>

Try to assign new template instead of sales/order/totals.phtml in order_totals and modify that new template to display only totals. I have not tested but this can give you direction.

like image 75
Kamal Joshi Avatar answered Apr 02 '23 11:04

Kamal Joshi


The default emails are located on

 /app/locale/en_US/template/email/ 

Thanks

like image 26
lavb Avatar answered Apr 02 '23 09:04

lavb