Hello everyone, I have a product that has different colors. we configure the option of variants but I am having a problem.
Each variant has its own photo. If the customer selects a color variant in the drop list, the photo of that variant automatically appears.
But if the client does it in the wrong way; select the photo first, the variant does not match the photo that the user selected.
How can that problem be corrected?
Here is the page so you can see what I say: https://bit.ly/3dhpwet
You can follow this to implement it https://shopify.dev/tutorials/customize-theme-select-variants-by-clicking-images
but if you are not comfortable in code you can drop me an email and we will discuss further.
I posted the same thing the other day. I had followed the link and inserted the code as it said, but it didn't work. When I clicked on the image it would open it in another window.
Not sure what went wrong but I undid everything. Read the entire page, not just the first steps. ended up adding the trim option to line 12 and it worked.
one thing to note, if you have customized your product template you have to modify that one, not the original. i.e. the default (under section) is product-template.liquid, I modified mine and my pages use product-custom-template.liquid
it's pretty simple process. I would recommend making a duplicate of your theme first. (themes/Action/duplicate)