In my new order email, i have the line:
"layout area=\"frontend\" handle=\"sales_email_order_invoice_items\" invoice=$invoice order=$order":"Invoice Items Grid",
The majority of the time the email formats correctly using the correct template I've created in themename/default/template/email/sales/order/totals.phtml. However, roughly 10% of the time, this template is not being used - I assume because $order is returning false and it's using "Invoice Items Grid" instead.
a) Is my assumption correct?
b) If so, what triggers $order to be false here? I can't find any common theme with the customers who have received the incorrectly formatted emails.
c) What generates "Invoice Items Grid" instead, is it the Mage_Adminhtml_Block_Sales_Order_View block?
Thanks in advance for any insight!