Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Adding colour swatches to Product page
Jr. Member
Total Posts:  9
Joined:  2008-04-16


I want to add images showing the available colours for products on the product page.

Ideally i would like to be able to dynamically change the main image on the product page depending on the colour attribute selected from the drop down box - is this possible? Is there some javascript that could do this?

If not then just a table displaying all the swatch images (8-10) would be fine but it seems you can only set a custom layout on the product page which requires xml - something i am not skilled in!

I have been able to add a table to the category page by using a static block, but really these images should be on the product page as that is where the customer would be required to pick a colour.

Can anyone help?

Many thanks

Magento Community Magento Community
Magento Community
Magento Community
Sr. Member
Total Posts:  103
Joined:  2008-02-02

If you add more images to the product then they will show under the product image as ‘More Views’ so at least people could see the options.  I don’t think the functionality to change image based on an attribute is part of the core functionality yet - although in this post - - It was indicated that it would be included at some point. (look down at the last post).  It doesn’t seem to be listed anywhere on the road map though.

You can show the image for the correct item in the shopping cart, though.  In System/Configuration/Checkout under Shopping Cart you can choose to show the actual products image.


Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top