1
Answers
Vote up!
0
Vote down!

Line Items Product Display relations

Hello!

What is the right way to use line item type, that assigned to product display (or maybe product type) in views?

For example, we have catalog of product displays, based on taxonomy + views and they must have various line item types. Our product displays already have product reference fileld with assigned line item type, but i can't figure it out how to use that relation without setting it in views product field .

I found some workaround at https://drupal.org/node/1798006, but last post was on March 20 2013. has anything changed since that moment?

Asked by: pouldenton
on April 9, 2014

1 Answer

Vote up!
1
Vote down!

I will try to answer, but I'm not sure if I have correctly understood the question.

You said For example, we have catalog of product displays, based on taxonomy + views and they must have various line item types>/cite>

-------
First, I wanted to check the setup of displays and line types is clear (apologies if this is all know to you)

Each product display will have one line type assigned to it for the product selection (add to cart), selected through the field Display settings for Product Variations Add to card form.

Other line item types handle secondary layers such as shipping.
-------

So, what I think may be the issue is that you are trying to display line item information that doesn't exist yet.

For example, if I build a view of Commerce Products for a product display (rather than using the standard Commerce product display node method), then line items are not relevant here because we are not displaying lines of products added to the cart.

So all the information available at that stage is in the Product Variation (Commerce Product in Views) or the Product Display ( Commerce Product: Referencing Node in Views).

if I've misunderstood, let me know and I'll edit this

Answer by: mikeaja
Posted: Apr 10, 2014

Comments

This is kind of silly that I can't edit my own answer (to make it better). This doesn't encourage new users helping out.

- mikeaja on April 10, 2014

Thank's for your answer, but there are some misunderstooding. I forgot to tell about main nuance, my mistake.

You said: "Each product display will have one line type assigned to it for the product selection (add to cart), selected through the field Display settings for Product Variations Add to card form."

It's true when we build our view, based on full nodes, but when view consists of fields, we can add product cart form field (through product field relation) and we must choose line item type for all referenced product in options of add to cart form field, although all of products display types already have assigned line item type.

All I need is different line items per product type (or product display type) in the view based on product display fields. This is the main issue...

- pouldenton on April 10, 2014

Thank you for your reply, mikeaja! I tryed to answer you, but there seems to be some problems with comments moderation, and my previos comment lost, so i already posted question at http://drupal.stackexchange.com/questions/110002/line-items-type-and-pro... In my previous post here, i forgot about main thing, my view consists of fields, not nodes. And therefore i can't use line item type that already assigned to product display, and i forced to choose line item time in options of add_to_cart_form filed and this choise applies to all products in the view. This is the main problem.

- pouldenton on April 14, 2014