Skip to content

Commit c6dca8b

Browse files
committed
MC-40719: Product Thumbnails not switching properly for Config product
1 parent 3b397a9 commit c6dca8b

File tree

1 file changed

+42
-1
lines changed
  • app/code/Magento/ConfigurableProduct

1 file changed

+42
-1
lines changed
Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
1-
Magento_ConfigurableProduct module introduces new product type in the Magento application called Configurable Product.
1+
# Magento_ConfigurableProduct module
2+
3+
The Magento_ConfigurableProduct module introduces new product type in the Magento application called Configurable Product.
24
This module is designed to extend existing functionality of Magento_Catalog module by adding new product type.
35

46
Configurable Products let the customers select the variant they desire by choosing options.
57
For example, store owner sells t-shirts in two colors and three sizes.
8+
9+
## Structure
10+
11+
`ConfigurableProduct/` - the directory that declares ConfigurableProduct metadata used by the module.
12+
13+
For information about a typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure).
14+
15+
## Extensibility
16+
17+
Extension developers can interact with the Magento_ConfigurableProduct module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).
18+
19+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_WebapiAsync module.
20+
21+
## Additional information
22+
23+
### Configurable variables through the theme view.xml
24+
25+
There is a way to configure the mechanism of how images of a gallery should be
26+
updated when user switches between configurations of a product through modifying the value
27+
of the `gallery_switch_strategy` variable in the theme view.xml file.
28+
29+
[Learn how to configure variables in view.xml](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/themes/theme-images.html#view_xml_vars)
30+
31+
There are two available values for the `gallery_switch_strategy` variable:
32+
33+
Value | Description
34+
--- | ---
35+
`replace` | In replace mode, images of the parent configurable product will be replaced by the simple product images upon a configuration change
36+
`prepend` | In prepend mode, the simple product images will be added in front of the parent configurable product upon a configuration change
37+
38+
If the `gallery_switch_strategy` variable is not defined, the default value `replace` will be used.
39+
40+
For example, adding these lines of code to the theme view.xml will set the gallery behavior to `replace` mode.
41+
42+
```
43+
<vars module="Magento_ConfigurableProduct">
44+
<var name="gallery_switch_strategy">replace</var>
45+
</vars>
46+
```

0 commit comments

Comments
 (0)