I have used some code to display variant images in replacement of the default text. This works for some products but others it shows the wrong variant image.
^ this works perfectly. The image shown in the variant selection is correct and matches that selected in Shopify.
^ here the wrong image is being displayed in the variant selection compared to what is set in Shopify. Strangely the same image is used for 4 variants then changes. Note that as per the product each variant has a unique image which you can see when selecting.
My guess is the code I am using is having issues when there is 2 variant options set but works with 1. See attached for the code I am using.
Any assistance with this would be greatly appreciated.
Dive into the world of Print-on-Demand and discover how it can transform your online busin...By Imogen Feb 19, 2024
Discover how to transform your online store into a delightful shopping destination. Learn ...By Ollie Feb 13, 2024