0

how can I display node info(not only title but all fields) into cart? Example: My site has a lot of stores and each store can buy some books. How can I display stores info into user cart? Thanks in advice

1 Answer 1

1

The Drupal cart is a views display of commerce line items. Depending on your setup you'll have to alter the existing cart view and add one or two views relationships (in the advanced section).

  • The first relationship is from commerce line-item to commerce product. It is called something like Commerce line-item: Product. This exposes all product properties to the view.
  • If you use a product display with custom properties, you can also add Commerce Product: Referencing Node (depending on the fields you need this one is optional).

Now you have all field of your product (and product display) available to views and you can add them in the Fields section.

Your Answer

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

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