Hello Magento Pals ?,
This technical blog fixes the problem of Show Double Thumbnail Image When Select Configurable Products in Magento 2. Previously I shared How to Add Custom Layout Dropdown on CMS Page after Magento 2.3.4. Let’s look at the issue elaborately and solve it ?
Magento 2 supports different product types to bifurcate wide range of products accordingly. One of the product types is a configurable product, that provides options like color, size, etc. The options contain separate SKUs. Let us find out the problem with configurable products in Magento 2.
Contents
Configurable products are added from the admin panel and the images are allocated to each option. Within the product page in the frontend, it shows thumbnails of different images of the product. But as the other option is selected like color or size, it shows repeated thumbnails. This affects the user experience of your store. Thus, the below-mentioned solution will help to overcome this issue.
Step 1: Go to the following path
app\design\frontend\Themes\Yourtheme\etc\view.xml
Step 2: Find below code
<vars module="Magento_ConfigurableProduct"> <var name="gallery_switch_strategy">prepend</var> </vars>
Replace it with below code :
<vars module="Magento_ConfigurableProduct"> <var name="gallery_switch_strategy">replace</var> </vars>
That is it.
Hence, with the above solution, manage your configurable products’ thumbnails in Magento 2 store. In case of any doubts, you can ask me in the comment part. Also, do share the solution with your Magento friends. See you next time. Until then stay connected for more such solutions.
Happy Fixing ?
Hello Magento Friends, In this blog, we will discuss about adding quantity increment and decrement…
In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…
In the world of business, understanding financial metrics is crucial for making informed decisions and…
Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…
In this era, businesses are always on the lookout for ways to engage with their…
Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…
View Comments
I tested this method and it doesn't work anymore.
https://magento.stackexchange.com/questions/339442/magento-2-4-2-how-to-hide-duplicate-pictures-when-the-product-color-is-switched
Kindly confirm you implemented it properly. which error you are facing here? what is your Magento version?