1

So I have a Product field called "Quantity Per Box". It's a field that says how many items (in this case, screws, nuts, and bolts) come in each box. I want to display this number in the view when the customer goes to cart.

I have the field as part of the product already. What I have done so far is added the existing field to line items, and checked the box to add that field to the cart. Then I edited the view to add that item. The label shows up "Quantity Per Box" but there is no value in the field from the product. I've tried this several different ways with no success. Can someone help me out here, what am I missing?

1 Answer 1

0

To be absolutely clear, you want the "Quantity Per Box" field present on product entities to display on the cart view? For that you'll need to add I believe the "Commerce Line Item: Referenced Products" relationship in the view. That should give you access to the product fields, with no need to copy a field from product entities to line item entities.

Since the cart is a Commerce Order view: Relationships needed to reach products can be visualized as: commerce_order->commerce_line_items->commerce_product

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.