0

On a typical Drupal Commerce website a user can see the following tabs on his user-page:

View
Edit
Orders
Address Book

I am trying to figure out how to get Products tab added to this list, which would list all the Products (actually Product Displays to be exact in Drupal Commerce terms) purchased by the user. It would be very much like Orders page, but instead of Order numbers this page would be outputting Product Display nids, titles, etc.

Alternatively, getting Product Display nids listed on the Orders page would suffice to my purposes, if this is easier. The order page is represented by the 'commerce_user_orders' view, but I can't figure out how to get product display nid there as there is no any product-related options. There is a "Line items" option which lists Title of the product, but doesn't link to actual Product Display page. Basically I need users to be able to go to the specific Product pages from their orders pages directly associated with the product displays.

0

You can use the module commerce_product_attributes to show more product details on the line item.

Attribute field for line item: This field allows the presentation of the product in the shopping cart by a separated view mode. A new product display is added. There you can define the fields which should be displayed for this product type in the shopping cart.

While it can be used on the shopping cart, it can also be used on the Orders view.

  • David, thanks for your response, but as explained above I really need to provide direct links to the product display pages (node entities in my case). – Nick Dec 20 '15 at 7:06
0

You should be able to use the View field called:

Commerce Line item: Display path

Appears in: commerce_line_item:product, commerce_line_item:product_discount.

This field links the line item to the product page that added it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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