I've been asked to include this modification for people who want to have order-based Purchase Order Numbers, pulling that info from the encrypted field and making it searchable in the admin Orders section. This mod also includes PO Numbers on invoices.
Caveat: In this mod, the new PO Number field is not encrypted. If that's important, then you must modify further to include encryption.
This has been tested on X-Cart 4.1.7. You may wish to modify further for other versions of X-Cart.
Don't forget -- Step One is to create a new field in the database. Steps Two through Ten follow in the next post.
Step 1: Create a new database field with phpMyAdmin or another method in the xcart_orders table directly after "extra," called po_number. (Varchar(50), not null).
see next post for more...