3

I need your help please. I couldn't find answer from anywhere on how to insert an Invoice Date to Shipment transactional e-mail.

I tried to use the {{var invoice.created_at}} but it gives me a blank result. i.e. http://prntscr.com/5cgoub

I can understand that the Invoice template doesn't have an Invoice date inserted, but I'm hoping that this is possible via a custom variable?

Thanks in advance for your help.

1
  • Do you mean the shipment email or invoice emails? Jan 22 '15 at 13:46
1

Unless I am confused by your question the shipment emails do not contain the invoice information.

During the sendEmail function in Mage_Sales_Model_Order_Shipment you can see what objects are added to the email for use.

$mailer->setTemplateParams(array(
        'order'        => $order,
        'shipment'     => $this,
        'comment'      => $comment,
        'billing'      => $order->getBillingAddress(),
        'payment_html' => $paymentBlockHtml
    )
);

Technically you can use the order object and try to load the invoice and then get the date but I think an order could technically have multiple invoices so I wonder if your thinking is not a bit flawed here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.