Thread tagged as: Question, Shop

Variant Image

Hi there!
I've begun to use variants in my shop and my goal is to display variant-related images (i.e. product.html starts off showing some general images, then when the user clicks onto to the variant color "BLUE" the main product images change to the BLUE photos).

So far I've successfully set up variants as a checkbox select where the page loads without an active selection. I plan to trigger the photo changes when the user selects a check box.

I'm stuck at the point of trying to get variant images (from variant.html) to display on product.html.
I've tried all of the shop template tags, but I can't get anything to display my variant images.

I've been referencing this thread a bit:
Cody has the "additional images" (variant images) living with the main product as opposed to living with the variant itself on variant.html. I suppose this is a workaround but it gets messy quickly when you have a lot of images or a lot of variants.

So, is there a way to pull variant product images onto the product page?

Thanks very much!!

Olympia Kyriakides

Olympia Kyriakides 1 points

  • 10 months ago
Drew McLellan

Drew McLellan 2634 points
Perch Support

There's no a way to do that directly. You need to get the images first, and then pass them into the template.