Add Purchase Order Number to the message template

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
I have a site that uses the Purchase Order payment method, how do I add the Purchase Order Number to the message template OrderPlaced.StoreOwnerNotification?
6 years ago
What version of nop are you using ?

I am using V4 and noticed that Purchase Order Payment method is not available in this version? The PO Number used to be a field in the Orders Table in older versions and so it was automatically displayed on the page as part of the order details if it had been used.

So in previous versons it was easy to do some development an add a new token to display it in the message template.

Actually searching forums and I think PO Number now is to be stored in Order.CustomerValuesXML see https://www.nopcommerce.com/boards/t/44724/localized-key-names-in-customvaluesxml-for-purchase-order-number.aspx
also https://www.nopcommerce.com/boards/t/36103/is-there-a-customer-purchase-order-column-in-nopcommerce-350.aspx

Anyway looks like you need to do some develpment to get the PO Number in and out of this field via the Payment Method to use in a message template :)
6 years ago
I am using 3.9
5 years ago
In version 3.9 the purchase order is store as suggested

The Order record has a field CustomValuesXml which contains the PO Number

<?xml version="1.0" encoding="utf-16"?><DictionarySerializer><item><key>PO Number</key><value>123456</value></item></DictionarySerializer>

So you can put this in a Message Template

Date Ordered: %Order.CreatedOn% <br />
Payment Method:  %Order.PaymentMethod% <br />
Purchase Order: %Order.CustomValues% <br />
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.