| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
PO Numbers on Invoices, Searchable in Orders. | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
PO Numbers on Invoices, Searchable in Orders.
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...
__________________
Russell X-cart Version 4.1.9 [linux] |
|||||||
|
#2
|
|||||||
|
|||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Step 2: Add this to the bottom of xcart_root_folder/include/func/func.db.php: --(See reply #6 for a fix.)
Code:
Step 3: The above will not work if there are spaces in the PO Number, so modify xcart_root_folder/skin1/customer/main/payment_po.tpl: Add this script after the "required fields" script (just before the table tag): Code:
Code:
Code:
Step 4: Find the array in xcart_root_folder/include/func/func_order.php that begins: Code:
Code:
Code:
Step 5: Modify xcart_root_folder/include/orders.php: Find the array: Code:
Code:
In the same file, find: Code:
Code:
Then, find this "if" clause (around line 182): Code:
Code:
The last mod on this file is to find this case (around line 420): Code:
Code:
Step 6: In the file xcart_root_folder/admin/order.php, find this line (around line 190): Code:
Code:
Step 7: Edit the file xcart_root_folder/skin1/mail/html/order_invoice.tpl: Find this line: Code:
Code:
Step 8: Edit the file xcart_root_folder/skin1/main/order_info.tpl: After the table row: Code:
Code:
Step 9: Edit the file xcart_root_folder/skin1/main/order_list.tpl: Find the section: Code:
Code:
Find this line: Code:
Code:
Step 10: Edit the file xcart_root_folder/skin1/main/orders.tpl: Find the line: Code:
Code:
Now find the table row: Code:
Code:
That's it.
__________________
Russell X-cart Version 4.1.9 [linux] Last edited by Berto : 06-09-2007 at 02:05 PM. Reason: New function created for step 2 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Hello ...
This is great It's working fine ... apart from just one thing .. I'm not sure if it's the function getPONum() but as well as attaching the PO Number is also grabbing the first word of the next line (In this case it's Company Name) So when i look at the database the po_number field is showing "5361 Company" (5361 is the actual po number i entered) Any ideas ? Thanks A Lot ... Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#4
|
|||||||
|
|||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Oh, yes...
We removed the Company name and Name of purchaser from our po orders, so, no wonder this didn't come up! My function finds spaces, but not line returns. So here's a possible fix: Try this function instead in your file x-cart_root/include/func/func.db.php: Code:
Let me know if that one works!
__________________
Russell X-cart Version 4.1.9 [linux] |
|||||||
#5
|
|||||||||
|
|||||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Hello ... Just tried this ... But no joy
Any other ideas ? Thanks & Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#6
|
|||||||
|
|||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Ugh.
We've got to find how your system registers line breaks. So, try this function at the bottom of x-cart_root/include/func/func.db.php instead: Code:
Does that do it? I hope so!
__________________
Russell X-cart Version 4.1.9 [linux] |
|||||||
#7
|
|||||||||
|
|||||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Excellent !!
That did the trick ... Thanks very much !!! Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#8
|
|||||||
|
|||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Quote:
Hooray! Now it's a pretty nifty mod for 4.1.x. Cheers,
__________________
Russell X-cart Version 4.1.9 [linux] |
|||||||
#9
|
|||||||
|
|||||||
Re: PO Numbers on Invoices, Searchable in Orders.
I tried this on 4.2 ... yikes ... all kinds of stuff is broken now ... I think i backed up all the files but one So now to try to undo it all...
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
#10
|
|||||||
|
|||||||
Re: PO Numbers on Invoices, Searchable in Orders.
Quote:
Nevermind, I screwed up a step, it works fine!
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
|
|||
X-Cart forums © 2001-2020
|