Hi, I need to run some code each time a user submits an order. I'm using Drupal 7 w/ UC 3 and I'm not entirely sure what the appropriate hook is to use for this (or if there even is one?)
It's an export script, so additionally, I'm curious if I'll run into any problems if my code tries to query this order by:
db_query("SELECT primary_email FROM {uc_orders} ORDER BY order_id DESC LIMIT 1")->fetchField();
in other words, when is an order_id created? is it done when the user submits their order or some time before that?
If there's going to be a problem with that, can I run a series of hooks so i can store the order_id as a variable as soon as it's created, and if it goes to completion, that variable gets passed to the rest of the code?
