1

In magento 1.9.2.2, I added configurable swatches for color attribute.

The swatches are displayed and the color of the product changes, when the swatches are accessed. But the swatches are not working properly, when it is selected after selecting any thumbnail image i.e. when I select a thumbnail image and then select a color in the swatch, the thumbnail image is displayed instead of the selected color product.

The swatches are working perfectly when no thumbnail image selected in between.

What should be done to fix this issue?

1

Issue resolved.

Its jquery problem.My jquery for displaying the selected thumbnail image as base image is:

efunction changemainimage(srcc,idf)
{
    if(idf == "imgonly"){

    jQuery("#video_frame").hide();
    jQuery("#mrview").show();
    jQuery(".product-image-gallery .gallery-image.visible").attr("src",srcc);   
}
else if(idf == "vdionly")
{
    jQuery("#video_frame").show();

   return false;
}
}

Now I made changes in the second 5th line of my code as

$this.jQuery("#mrview").show();

Now exactly the selected thumbnail image is displayed as base image.Now the swatches are working perfectly when it is selected after selecting any thumbnail image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.