shopify - Changing image variant url when a user clicks on it
I'am facing an issue regarding the image thumbnails view, here is the sample website (smartphonewidgets.myshopify.com)
When you click on a product variant image, the browser show up the featured image instead of the variant one.
How could I resolve this please ?
If you are looking to select one of your variants when a variant image is clicked, Shopify has some documentation for this along with code snippets - Select Product Variants by Clicking their Image (https://help.shopify.com/en/themes/customization/products/variants/select-variants-by-clicking-images).
Depending on your theme, the code snippets may be cut/paste or you may need to dissect them a bit and adapt them for your needs.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.