Add product image to drupal commerce cart form Is there a way of hooking into the commerce cart form and adding a custom field which so happens to be the product image that I want to display?

I've tried via the view itself but I have no idea on how to when there is only the Order or Order Item objects available in the commerce cart form itself.

I've also tried the following hooks:


theme_views_pre_render
theme_preprocess_views_view
theme_views_data_alter
theme_commerce_cart_form_views_pre_render
theme_form_alter


But i've had no luck.

Can anyone suggest a solution, it's only temporary as I should imagine it will eventually be entwined with the drupal commerce module. 

Thanks in advance.
This can be accomplished from the front end by simply editing your commerce_cart_form view and using relationships to &quot;relate&quot; your way backwards from the order item to the product display.
Edit your cart form view and click Advanced on the right side of the screen. Then under Relationships click &quot;Add&quot; then add and apply the following relationships in this order.

Product variation - Order item - &quot;The purchased product variation.&quot;
This will give access to add any of the fields under the Product Variation you are relating. it will also give you access to add the product type relationship in step 2.

Product - Product variation - &quot;The parent product.&quot; This will give access to add any of the fields that you have in the Product Type you are relating, (including the image field from your product display). This will also give you access to add a content relationship as seen in step 3.


Once you have added those relationships, you will be able to access and add any of the fields you want from both the product variation, and the product type under Fields.
If you are displaying with nodes and/or need fields that are in content types that have product references, you will also need to add the following relationship:

Content using field_YOUR_PRODUCT_REFERENCE - Product - &quot;Relate each Content with a field_YOUR_PRODUCT_REFERENCE set to the product.&quot; This will bring in all the fields for the display node.
No custom code required. :)