what I need is to hide all pics that doesn't bellongs to the selected color in swatch of configurable product, is there any way to achieve this? Thanks.
I've seen this similar question, but without any answer.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communitywhat I need is to hide all pics that doesn't bellongs to the selected color in swatch of configurable product, is there any way to achieve this? Thanks.
I've seen this similar question, but without any answer.
I get this using etc/view.xml
file in my theme, with this configuration:
<vars module="Magento_ConfigurableProduct">
<var name="gallery_switch_strategy">replace</var>
</vars>
The Luma Theme default value is prepend
. This link brings more information.
prepend
was the default at that time.
– lpFranz
Sep 4 '18 at 12:34
replace
and Luma overrides it. Anyway, thanks for sharing. +1
– Daan van den Bergh
Sep 4 '18 at 13:21