Matt
Matt

Reputation: 81

Magento 1.9.1 Swatches - Image Groups

After upgrading to 1.9.1 I have the colour swatch selection showing the right product image depending on the colour swatch selected on the product page.
Each product has a few alternative views per colour. These are shown below the main image as predicted as "More Views"
My problem is that ALL colours varients are shown in "More Views" when ideally only the alternative images of the colour selected should be shown.
Has anyone found a way to group the main image and it's alternative colour variant to show dependent on the swatch selected? Please see screen shots.

Upvotes: 6

Views: 4979

Answers (2)

Daniel
Daniel

Reputation: 13

I was also wondering about this... but I think the media gallery won't change out of the box in 1.9.1. However, you might be able to show and hide some image groups via CSS/JS to only show the associated images of the currently selected option.

Upvotes: 1

Daniel Kratohvil
Daniel Kratohvil

Reputation: 1261

In 1.9.1 there is a filter inside app/design/frontend/rwd/catalog/product/view/media.phtml that excludes any image with a Label matching any of the color options. All other images you upload on the configurable product will be shown.

On the configurable product, go to images tab and check your images:

  • You need to have one image checked as Base, Small and Thumbnail
  • (optional) One or more additional images to show below "More Views" (from one color option only). Do not upload all color options.
  • One image per each color option to be used as a swatch. Label each one with the color name and add the suffix "-swatch" (i.e. Light Green-swatch)
  • The RWD theme of Magento 1.9.1 will only swap the main image when you click on a swatch color. Images below "More Views" will remain the same.

    You can find more info on this article

    Upvotes: 2

    Related Questions