0

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

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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