Magento 1.9.1 Samples - Image Groups

After upgrading to 1.9.1, I have a color choice showing the correct product image depending on the color swatch selected on the product page.
Each product has several alternative types for each color. They are shown below the main image, as predicted as "More Views"
My problem is that ALL color variations are shown in "More Views" when ideally only alternative images of the selected color should be displayed.
Has anyone found a way to group the main image, and the alternative color for display depends on the selected pattern? See screenshots.

+6
source share
2 answers

In 1.9.1, there is a filter inside the application /design/frontend/rwd/catalog/product/view/media.phtml, which excludes any image with a label that matches any of the color options. All other images that you upload to the custom product will be displayed.

In the custom product, go to the images tab and check your images:

You need one image to be checked as Base, Small and Thumbnail (optional) One or more additional images, which will be shown below the "Additional Views" (for one color only). Do not load all color options. One image for each color parameter to be used as a sample. Name each color name and add the suffix "-swatch" (that is, Light Green-swatch)

The RWD Magento 1.9.1 theme will replace the main image only when you click on the color of the sample. The images below "More Views" will remain the same.

You can find more information on this article.

+2
source

I was also interested about this ... but I think the media gallery will not change out of the box in 1.9.1. However, you can show and hide some image groups using CSS / JS to display only related images of the currently selected option.

+1
source

Source: https://habr.com/ru/post/978794/


All Articles