Magento – Configurable swatch image changes back to default image after selecting attribute

configurable-productmagento-1.9swatches

I am experiencing some problems with my configurable swatches. I have set up a configurable product with 2 different attributes(color & size) with 1 configurable swatch being the color.

EXAMPLE

The base image is a red shirt. When I select a blue shirt it changes the image from red to blue as it is supposed to, but when I select a different size it changes back to the base image..

I've found a way to resolve this by adding a picture for every simple Item, but I have over 200 simple items and I would like to know if there is a faster way to fix this.

Best Answer

If you only have two configurable attributes; go to the configurable product page on the backend > associated products tab > slide the color attribute to the top. enter image description here

The way configurable works is that every time you change the top attribute resets other attributes to only show the options that are available according to inventory and availability rules that still apply to possible combination of attributes. Since color is the only visual change on the product options moving it to the top will make the cascading affect dependent of the color.

Note that there is another a little more complicated solution, but I only recommend it if this first one doesn't work or if you have more than 2 configurable attributes, as it becomes more complicated to achieve, specially if you are controlling inventory and combinations of product are very different from each other.

Related Topic