Reputation: 994
This is my email template file for invoice email:
\wamp\www\magento\app\locale\en_US\template\email\sales\invoice_new.html
<td> <h2 style="font-size:18px; font-weight:normal; margin:0;">Your Invoice #{{var invoice.increment_id}} for Order #{{var order.increment_id}}</h2> </td>
I don't understand how to pass the order id to this html file.
{{var invoice.increment_id}} from where this varible pass in this html file??
{{var order.getShippingAddress().getTelephone()}} where is written this function in magento ?
I want to use this variable and create function to get more data from magento table. So for that where do I have to add this function and how to call this function in invoice_new.html file?
Upvotes: 2
Views: 1391
Reputation: 2495
The variables are set in Mage_Sales_Model_Order_Invoice::sendEmail()
.
See this code:
$mailer->setTemplateParams(array(
'order' => $order,
'invoice' => $this,
'comment' => $comment,
'billing' => $order->getBillingAddress(),
'payment_html' => $paymentBlockHtml
)
);
You can add your own data the same way.
Upvotes: 1