Adding info to Order
Just wanted to touch base before I begin. Making data base changes.
I need to add a field that is directly tied to an order... i.e. delivery account for virtual goods. I've already implemented the hooks to add in the pane to the checkout process (need to specify it when entering billing info) and I handle the validation to insure it is a correct account.
I expect I'll need to hook the order view to display this info as well.
No problem... although it took forever to figure out how to do all the hooks and data structures correctly as the documentation is a bit obtuse.
My question, should I just modify the order table to add this addition column? This may be my preference as it is tied directly to an order and must be tracked for that order and will vary from order to order. Alternatively, I can create a new table that links the order to the delivery account. This seems like more work in managing the life cycle of these table entries and insuring they are always deleted if an order is deleted.
My only concern with modifying the order table is that is could cause difficulties when Drupal Commerce updates are installed.
Okay, looks like the proper way is to actually attach a field to an order. I can do this in the UI via the Order Settings. However I am still stuck on linking the data retrieved from the pane (which isn't a field) to the order field info. I see the field in the order structure but can not find info on how to set that in order to be persistent. Any changes are removed between the submit and review hook functions.