I have an existing shipping / inventory control system that I wrote in vb.net a year agao, and it works great for shipping our daily orders. It interfaces with scales, OCR scanners, etc. It's got a MYSQL backend, so interfaceing it will be easy. I need to do the following. When a user completes an order, I need to write all the order info over into my system.
I've written a Paypal IPN interface which works great when we get a Paypal order from Ebay, etc. so I have written all the queries I'll need, but I have some questions on how to interface this with Ubercart.
I'm assuiming I'll use hook_order() and do a mymodule_order() function to save the data. Here are my questions.
1. What order state do I want to look for. I need to make sure this is called only 1 time after an order has been submitted and payment has been approved. Do I use 'submit', 'save', or is there a status that 'complete'?
2. I'm assuming I can read all the data I need from teh Order object, Where is the order object documented, I can't find a place that list all the variables that I'll need to read to get email, address, product details, etc. This must be somehwere, but I could not find it.
3. Does someone have an example of a hook_order module that writes data to a 3rd party system, I didn't see one, but if we don't have one on the forum, I can post my code up once it's complete tomorrow as an example.
I want to code this later today, so if you have any ideas or shortcuts I should use to build the interface, please share.
Jim






Joined: 10/29/2007