是否可以在 creditmemo 电子邮件中使用 {{var invoice.increment_id}}?如果我这样做是行不通的...
<p><strong>Bestellnummer:</strong> {{var order.increment_id}}</p>
<p><strong>Datum:</strong> {{var creditmemo.created_at}}</p>
<p><strong>Rechnung:</strong> {{var invoice.increment_id}}</p>
<p>Liebe(r) {{htmlescape var=$order.getCustomerName()}},<br/><br/>
不工作。有人对我有提示吗?谢谢!
编辑
这是正确的吗?编辑 Mage_Sales_Model_Order_Creditmemo 类并添加:
//Get Invocie from order Object
if ($order->hasInvoices()) {
// "$_eachInvoice" is each of the Invoice object of the order "$order"
foreach ($order->getInvoiceCollection() as $_eachInvoice) {
$invoice = $_eachInvoice->getIncrementId();
}
//$invoice = $order->getInvoiceCollection();
}
也
$mailer->setTemplateParams(array(
'order' => $order,
'creditmemo' => $this,
'comment' => $comment,
'invoice' => $invoice,
'billing' => $order->getBillingAddress()
)
);
然后在我的电子邮件模板中调用变量 {{var invoice}}?
但它没有显示,我在这里缺少什么?