Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 776
Matt Avatar asked Nov 27 '14 14:11

Matt


2 Answers

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

    like image 113
    Daniel Kratohvil Avatar answered Nov 19 '22 00:11

    Daniel Kratohvil


    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.

    like image 26
    Daniel Avatar answered Nov 19 '22 01:11

    Daniel