Drupal 8, commerce 2: I would like to make a a view of commerce products and show a) the title of the product b) the image of one of the product_variations, e.g. at delta 0. What I have done: * view of products
add relationship to product_variations
add the variation image field for display
-- this gets me a list of products and images, but it is in essence a list of variations, with the product title repeated over the different images, so
- I turn on aggregation and
-- I get this error: Table 'mytable.commerce_product_variation__field_variation_image' doesn't exist:
WITHOUT the product_variation image field and aggregation on, I have the correct list of product titles.
This seems like a pretty basic need for a view of products, without we put an image field directly on the product.
One alternative I have explored is to do a rendered entity of the Product and make simplified view modes for the product_variation and product, then set the display mode for the entity in the view, but I will have to customize the field display for every type of product_variation and product I have, and in my one test its still not right, giving me duplicate variation images stacked under the product title, and there is no way to specify "link to content" when using the rendered entity, or do any custom buttons as you might do using fields. I suppose its possible to get this way to work using twig templates, but it seems a lot tougher than if we could have a working aggregation while using a relationship.