get an automatic PO number at cart checkout, based on order number.
| Project: | UC Purchase Order |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
(Moving this issue from Ubercart.org issue tracker to here.)
Originally posted 11/19/2007
------------------------------------------------------------
In Belgium you can pay by bank transfer with on it we call a "structured communication" (involving a modulo 97 control check with the last 2 digits) like for instance 001/0000/00985 for order # 10000009 .
My will is to be able to give the PO number at cart review, automatically calculated on the order number.
this is important that the "structured communication" (thus my PO numbers) follows the order numbers.
I don't manage to do this because on order number only exist if cart checkout failed or after cart review order submission. (If I understood it well in the code )
I have the simple algorithm that would transform order 10000009 into 001/0000/00985, so that's not the problem. The problem is to have the right order_id at an earlier stage of the checkout to be able to show the right PO to the user for him to pay it correctly.
How and where can I tune the uc_po module (or order or cart module) ?
Observation :
- you can't use db_next_id('{uc_orders}_order_id') in the default value of the uc_payment_method_po_form because an uc_order_new is performed after and thus 2 steps in the sequence are taken and the PO number is then different than the order number.
- you can't neither only read this sequence for the default value because if two users are on checkout at the same time before a new order is emitted, then they would have the same PO number with different order number, and it's very wrong.
Thank you in advance.
------------------------------------------------------------
(1 reply posted 04/13/2008)
order ID as PO number
In Slovakia, eshop can have "pay through your bank account" ability. When you select this ability, eshop provide you their bank account number and some code for identification of transaction. Obviously it is number of order (order id).
I’m tried out this module (uc_po). It is similar way of payment as I described, but I don’t want to give customer option to create his own PO number. I would use order id as PO number. Can you help me with implementation, please?
I don’t know program in php : (

#1
Hi! You could look at this:
http://drupal.org/node/361880#comment-1255600
Maybe it could be modified in order to do the automatic numbering
#2