I am building a Shopify store and need some custom code.
When viewing the main product, we want to have swatches:
1. When a swatch is clicked, it should change the main product image to the variant's image.
2. The swatch image should be based on the SKU of the variant. So, say the SKU of the variant is BLACK-2343, then the swatch image would be named black-2343.jpg.
3. The image would NOT be case sensitive and could end in .jpg, .png, .jpeg, .svg or .gif
I will upload my swatches using Settings > Files, in Shopify.
For someone who knows Shopify, this shouldn't take more than 3 hours.