hitman0042 Posted November 5, 2010 Posted November 5, 2010 Hi , I wanna display the order number in checkout specifically in the pagesm "checkout_payment" and "Checkout_confirmation" and the very last page where it says your order has been confirmed. I need the order number obviously to keep up with the system. So if the next order is order number 41 then the next person checkout will says your order is 41 then after that the next persons should say yuor order is 42. how do i do this?
MrPhil Posted November 5, 2010 Posted November 5, 2010 I think you would have to "reserve" the ID, and not grab the indicated "next" ID. Someone else could be checking out at about the same time, and see the same "next" ID as you. The usual way to do this would be to INSERT a dummy record (assuming you don't have all the information at this point) to get your order number (ID). Then it could be displayed. When it comes time to enter the actual order record, you would do an UPDATE or REPLACE where ID=your new ID, rather than INSERT. You would need to pay attention to incomplete or canceled orders (presumably the reason why the order record is not already INSERTed at this point). At some point, perhaps by looking at order dummy records, you would determine that an order was abandoned during checkout. Then you could do cleanup of the dummy order record and the shopping cart, too. You would want to notify the store administrator that specific ID is not going to show up (otherwise you may be wondering why there's a gap in the order number sequence).
hitman0042 Posted November 7, 2010 Author Posted November 7, 2010 wow i do not understand 1 thing. Isnt there like an add on that i can just patch files over ? The problem is, i want people to bank deposit money when they purchase things. But i want them to quote their order number as the transaction description so i know whos payment has gone through.
Guest Posted November 7, 2010 Posted November 7, 2010 Mason, As Phil stated, the order number is not generated until checkout_success.php is reached. Therefore anyone who is checking out at the same time MIGHT not get the order number you want to display on the checkout_payment so with the current code, you can NOT guarantee the order id assigned during checkout will be the order id at the end of the process. Phil is saying you would have to re-write the checkout process (all 7 files) to assign an ID from the shopping cart and carry the same ID through the entire checkout procedure. There is NO current contribution for this. Chris
hitman0042 Posted November 7, 2010 Author Posted November 7, 2010 hmm that seems to complicated and not worth it. What else would you recommend. People need to be able to quote their order number in the bank deposits or else it will cause too much confusion?
Guest Posted November 8, 2010 Posted November 8, 2010 Mason, Unfortunately, there is no existing means to use the Order ID for that purpose. Chris
hitman0042 Posted November 8, 2010 Author Posted November 8, 2010 Is it possible to send a confirmation email back to the buyer? For eg, when a buyer buys, i get a quick invoice in my email. Is it possible that email gets automatically to their email because that contains the order number?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.