0

クレジットメモの電子メールで{{varinvoice.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}}を呼び出しますか?
しかし、それは表示されません、私がここで欠けているものは何ですか?

4

2 に答える 2

2

モジュールのモデルを書き直しMage_Sales_Model_Order_Creditmemo、必要なロジックをsendUpdateEmail()メソッドに追加して、クレジットメモの電子メールテンプレートで請求書オブジェクトを取得する必要があります。

于 2012-10-07T00:24:39.633 に答える
0

私の最初の投稿を参照してください。正解です。Zyavaに感謝します。
問題は、sendEmail()のsendUpdateEMail()の1つ上のメソッドにこのコードを配置する必要があることでした。

ありがとう!

于 2012-10-07T15:49:32.657 に答える