Magento – Change product image for configurable products

ce-1.7.0.2configurable-productproduct-imagesproduct-view

I was looking for a way that let me change the product image based on the attribute selected for the configurable product. e.g.

Configurable Product With Color Options : 1) Red 2) Green

If the Red is selected by user is should change the main image on the details page with the one from associated products.

I have looked over this one Simple Configurable Product

But in the reviews some one is saying that image changing is not working also this is adding and extra functionality for pricing based on associated products this is not what i was thinking.

Any one having any idea how this can achieve without having to put too much work.
Thanks.

Best Answer

The question is tagged with but for future reference, if you are using or higher, the feature is already built in, with the so-called Configurable Swatches which allow "Product Image Swap".

You can enable this feature in System > Configuration > CATALOG > Configurable Swatches

Product Image Swap

The following animation shows how this works on product listing and product detail pages:

animation

Swap Images Defined by Option Label

One way to configure swap images is to upload images to a configurable product with labels exactly matching the specific option labels (for example, Royal Blue).

Here is an example of a configurable product image gallery images that contains images for three colors:

option label configuration

Swap Images Defined by Base Image

Another way to configure swap images is to upload base images to each child product of the configurable product.

Here is an example of a Royal Blue child product with an attached base image:

base image configuration

Source and full documentation: http://docs.magento.com/m1/ce/user_guide/catalog/product-configurable-swatch.html

Related Topic