Custom line item field to pull value from Product Display.
I'm selling product by the case which has a field on the Product Display called unit quantity which determines how many units there are in each case. I'd like to display this information on the order line item using a custom field on the Product line item type.
This field value should be automatically copied into the line item field when a product is added to the cart.
I've looked at the the walkthrough video for custom line items types however the usecase describes adding the custom field to the cart for the user to fill out (i.e. registration name).
I've also thought about adding a relationship to the order line item view to link back to the product display (through product) and simply display the field however i fear that this will pull back the live data for historical records.
Is there a way i can do this with Rules? something i'm missing?
I needed to acheive the same
I needed to acheive the same thing - show a product display node field in the cart summary view. Rather than copying the value into the line item you can create relationships in the view to display the product display field with each line item.
Full solution is here - http://www.apsinfrastructure.co.uk/blog/drupal-commerce-cart-node-fields
2 display nodes for 1 product
Great! I was looking for it.
But I have a problem: When I implemented your solution, I got the fields I need but when I have 2 display nodes for 1 product in the view got 1 row ever display node (2 row).
Could you say me how can i do it?