Re: How to show only variant images of a selected option.

How to show only variant images of a selected option.

DiemD
Shopify Partner
1 0 0

Hello everyone,


I'm new to shopify and for a product I need to show only variant images of the current selected color. My other option is the size. For examplen I have a product with 2 color options in red and green and 2 size options small and big. I have 4 variants with images, one for each combination (red,small),(red,big) ,(green,small) ,(green,big). When I select a color I only want to show the variant images with the selected color. I Need to code it by myself, has anyone an idea how to achieve this? One very pity thing is, that I can't access product.variants.featured_image.variant_ids like its availabe in the JSON model of the product, but it's not accessible over liquid classes.

DiemD_0-1651014403200.png

 

Greetings and any help is appreciated.

Reply 1 (1)

websensepro
Shopify Partner
1272 144 160

Hello, You need to find everything you need to know by watching this tutorial:

https://websensepro.com/blog/how-to-show-only-selected-variant-images-shopify-debut-theme/

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial