How to alter commerce cart view to show custom line item data - either through UI or custom module In a custom module I am adding data to a line item added to the cart like this:

$user_to_add =_get_user_by_ain($ain);
$product = commerce_product_load($product_id);
$line_item = commerce_product_line_item_new($product, 1, 0, array('apply_to_user' =&gt; $user_to_add));
commerce_cart_product_add($user-&gt;uid, $line_item);


This data is used in Rules after checkout is completed.  What I'm struggling with now is being able to show that data in the cart view (default, Commerce provided, commerce_cart_form).  For example, if the $user_to_add contains the users first name, I'd like to be able to show that in the cart view next to the product label.

I've been going through the views api, testing the hooks available, and I can't figure out where to do this.  In the hooks that I've tried, the data is is available in $view-&gt;result[0]-&gt;_field_data['commerce_line_item_field_data_commerce_line_items_line_item_]['entity']-&gt;data['apply_to_user']
If you're wanting to display information from inside the $order-&gt;data array, then you'll need to create a Views handler for each value and write some code to load the object, access the data, and then display it. An example of how to do this can be found in the GetID3 views integration. It loads file metadata and exposes it to views, but the idea is the same.