| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Purchase Order field for Customer | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'm currently trying to add a Purchase Order# field into the checkout process so that customers can reference a PO# for there company. I would like this to show on the Order Invoice both for the customer and the Provider/Admin.
Has anyone done this mod on thier cart? I would like the PO field to be located in the payment part of the cart similar to the way that "Ship To:" is implemented. Anyone have an pointers on where to start? TIA
__________________
-- Austin |
|||||||
#2
|
|||||||
|
|||||||
![]() Sorry, replying to my own thread. At least I'm posting a mod, huh?
![]() ********* Template Code ************* Create a new template for the invoice field at checkout time. I created a file called /skin1/customer/main/purchase_order.tpl and put the following in that file: Code:
Then edit /skin1/customer/main/customer_details.tpl like this below: Code:
To display it in the orders admin screen edit /skin1/main/history_order.tpl and look for: Code:
Add this below: Code:
To add it to the printable invoice (/skin1/main/order_invoice_print.tpl), add this below: Code:
********** Backend Code ************** Add a new field to the xcart_orders table. Code:
Modify /include/payment_method.php and look for the line: Code:
Add this below that line. Code:
Then modify /includes/func.php around line 1157. (should be all one line. Watch out for line wrap). This is where order info gets put into the database. We need to add our new table field (purhcase_order) and grab the cust_po out of $userinfo to add to the database. Code:
Let me know if anyone sees any holes or problems with this mod. So far it's working well for me. I'm using Xcart Version 3.3.3, use at your own risk, YMMV, etc.
__________________
-- Austin |
|||||||
#3
|
|||||||
|
|||||||
![]() I've been using 3.4.3 and I cannot get this to work no matter what I try. The only thing I have done is changed cust_po to rep_id, and purchase_order to sales_rep. But i've made the changes everywhere so there shouldn't be any problems.
The rep id box shows up on the payment page, however it is not included in the mailing nor is it on my admin orders printable page or the customers. What am I doing wrong? Could you please copy the source of your purchase_order.tpl? Maybe my .tpl isn't formated correctly. Thanks. |
|||||||
#4
|
|||||||
|
|||||||
![]() Quote:
Is it getting added to the database? If so, then it's a template display problem. Quote:
It's at the top of the thread, but here it is again just in case. Code:
FYI, I'm using Xcart version 3.3.3. So maybe the templates are different in the newer version you're using?
__________________
-- Austin |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|