Best way to store custom commerce pane form data as part of an order? I have a custom checkout pane that only loads if there is a product of type 'Event' in the cart. For each product of type 'Event' in the cart, the pane prints out two custom fields: 'Ticketholder's Name' and 'Ticketholder's Email'. Further depend on the event there are upto another 8 extra fields such as 'Dietary Requirements' and 'Arrival Time'.

In the past, if I have a custom value that I want sent through with the order, I have created a custom field within the order fields, and then set the value in the following way:

$order-&gt;field_my_custom_field['und']['0']['value'] = 'my custom value';
commerce_order_save($order);


Now this seems fine for custom values that need to be set for all orders. However with this custom checkout pane, these custom fields only appear for 'events'. Further it is dynamic, so if there are 2 tickets for the same event (i.e one product of quantity 2) in the cart, it will need to store Ticketholder's Name &amp; Email etc. for both ticket 1 and ticket 2. 

So is there a more appropriate way to set the custom values and display them when you go to Store > Orders > View Order? Can I programmatically attach the custom fields to the order? 

In the past I have looked at adding custom line items to checkout to store this kind of data but have been unsuccessful in getting them to display within Store > Orders > View Order. Further the same event, with quantity 2 will just be one line item in the cart so I'm not sure how you would attach the data for both ticketholders in this way.

What is the best way to store this data as part of the Order, so that it is accessible at Store > Orders > View Order?

Thanks for your help!
I have had the same issue for some time with field collections and simply switching the panes on and off in the order entity was not doing the trick.  I ended up being able to work up a solution using order types.  http://drupal.org/project/commerce_order_types

In addition I want to mention that we used the following patch: http://drupal.org/node/1887812 so that commerce could recognize panes from different order types.  At this point your already there, its a simple process of switching order types and subsequent panes based on the order type.