Showing related products
I am really stuck on a problem right now. I am sure it's not a big deal, but due to my newness I just can't figure it out:
I need to show related products on my product display node. The information comes from the product itself. All the products have a field called 'display group'. So whenever I display a product I want to display link-wrapped images of other products of the same 'display group'.
First I tried to create views with contextual filters. But it seems, they have no access to the product information - even with relationships. At least I wasn't able to get it to work.
My second try was to edit the product display node template itself. I am able to get an array of the matching products with the commerce_product_match_products() function. But again I have no idea how to render it properly.
I still think views is the way to go. I am really thankful for any input.
You're right, you can do this
You're right, you can do this with Views.
If I understand what you're trying to do you need to add a relationship to "Field: Product variations". That should give you access to pricing fields, images etc.
(Just noticed the date on this question, but I'm still going to post the answer)