I am trying to change my product image by clicking the generated swatch (the images change by changing the variant option dropdown), but I can only get the swatch to change the dropdown and the dropdown to change the image.
In the img src tag of the swatch, I have added:
Code:
onClick="javascript:document.getElementById('po'+{$item.classid}).value={$item.optionid}
This makes the option change... but no image change. I am also able to create a link around the option name in my swatch table and change the main image using the product_thumbnail id, but I can't get thevariant id into the img link on the product.tpl without manuanlly entering it. Ideas?
Thanks for your help,
Mike