1
Answers
Vote up!
0
Vote down!

using images from product variants in a product display view

Hey!
I have products with multiple variants. Some variants have images, some don't. When I create a view of product display nodes any product that doesn't have an image in its first variant shows up as having no image at all... is there a way to either choose all available images from variants in the listings (and perhaps display them in a slideshow) or at least just pick the first available variant image rather than showing a blank?

Many thanks for any ideas!
D.

Asked by: FunksMaName
on July 10, 2014

1 Answer

Vote up!
0
Vote down!

Just reporting back, I managed to do what I needed using views_field_view. I created a contextual filtered view that narrowed down the images and filtered out empty ones (filtered by height set to NULL) so that I was just left with whatever referenced display's variants images.

I did use this to make a cycle gallery but it failed because there were too many images. Instead I'm now using a single image from the most expensive variant. The sort criteria is set to price descending with only 1 result showing. Then I just feed the row's nid in the shop listing pages view.

Hope that helps someone one day :)
D.

Answer by: FunksMaName
Posted: Jul 14, 2014