how to show po# in shipment_html notification email for shipment update variables?

magento.stackexchange https://magento.stackexchange.com//questions/28585

  •  11-12-2019
  •  | 
  •  

Question

there are many variables which we can use for email templates and Unfortunately I couldn't find purchase order and moreover this file is html so how can I show the customer their purchase order number in notification email? I know that it is a payment method and we have a variable for that but it showed nothing to me

the variable is {{var paymentMethod}} I know that I should write my getpurchaseorder function inside order.php in mage/sales/order.php how ever I don't know how to write it to get the purchase method which is purchase order and then get the purchase order number

Was it helpful?

Solution

I went to order.php and I created my function

public function getPurchaseOrder()
{
  $paymentBlock = Mage::helper('payment')->getInfoBlock($this->getPayment())
            ->setIsSecureMode(true);
        $paymentBlock->getMethod()->setStore($storeId);
        $paymentBlockHtml = $paymentBlock->toHtml();
      return $paymentBlockHtml;
}

It was there in payment_html but for some reason it wasn't shown up in shipment_update although I can use it in shipment_new

so now I can use

 {{var order.getPurchaseOrder()}}

in email template! and that's done.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top