@graphcommerce/docs 6.2.0-canary.85 → 6.2.0-canary.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/framework/config.md +5 -0
- package/magento/configurable-products.md +95 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 6.2.0-canary.87
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2022](https://github.com/graphcommerce-org/graphcommerce/pull/2022) [`0495db84d`](https://github.com/graphcommerce-org/graphcommerce/commit/0495db84d1d450750bd74b94a379b4e7764a5753) - add documentation for the GraphCommerceStorefrontConfig gallery option. ([@carlocarels90](https://github.com/carlocarels90))
|
|
8
|
+
|
|
9
|
+
## 6.2.0-canary.86
|
|
10
|
+
|
|
3
11
|
## 6.2.0-canary.85
|
|
4
12
|
|
|
5
13
|
## 6.2.0-canary.84
|
package/framework/config.md
CHANGED
|
@@ -374,6 +374,11 @@ Options to configure which values will be replaced when a variant is selected on
|
|
|
374
374
|
|
|
375
375
|
Use the name, description, short description and meta data from the configured variant
|
|
376
376
|
|
|
377
|
+
#### `gallery: Boolean`
|
|
378
|
+
|
|
379
|
+
This option enables the automatic update of product gallery images on the product page when a variant is selected,
|
|
380
|
+
provided that the gallery images for the selected variant differ from the currently displayed images.
|
|
381
|
+
|
|
377
382
|
#### `url: Boolean`
|
|
378
383
|
|
|
379
384
|
When a variant is selected the URL of the product will be changed in the address bar.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
menu: Configurable Products
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Configurable Products
|
|
6
|
+
|
|
7
|
+
Example:
|
|
8
|
+
[Simple product (with pre-selection)](https://graphcommerce.vercel.app/p/matriarch-s-edges-size-4-6y-gc-469-sock-6y)
|
|
9
|
+
|
|
10
|
+
GraphCommerce enables various ways to manage the display of data from
|
|
11
|
+
configurable products in Magento. This flexibility allows you to choose dynamic
|
|
12
|
+
updates for the following data:
|
|
13
|
+
|
|
14
|
+
- **Content:** Name, description, short description, and meta-data from the
|
|
15
|
+
selected variant.
|
|
16
|
+
- **Gallery:** Automatically updates product gallery images on the product page
|
|
17
|
+
when a variant is chosen, provided the gallery images for the selected variant
|
|
18
|
+
differ from the currently displayed ones.
|
|
19
|
+
- **URL:** The product URL changes in the address bar when a variant is
|
|
20
|
+
selected, but this only happens when the actual variant can be accessed via
|
|
21
|
+
the URL.
|
|
22
|
+
|
|
23
|
+
## Enabling this Feature
|
|
24
|
+
|
|
25
|
+
To enable this feature, add the **configurableVariantValues** section to your
|
|
26
|
+
`graphcommerce.config.js` file and activate the desired options.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
const config = {
|
|
30
|
+
...
|
|
31
|
+
|
|
32
|
+
configurableVariantValues: {
|
|
33
|
+
url: true,
|
|
34
|
+
gallery: true,
|
|
35
|
+
content: true,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
configurableVariantForSimple: true,
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### GraphCommerceConfig
|
|
43
|
+
|
|
44
|
+
- #### `configurableVariantForSimple: Boolean`
|
|
45
|
+
|
|
46
|
+
Determines whether a simple product should appear as a Configurable Product
|
|
47
|
+
with pre-selected options or as the default Simple Product.
|
|
48
|
+
|
|
49
|
+
**How does this work:**
|
|
50
|
+
|
|
51
|
+
When the `products(filters: { url_key: { eq: 'simple-product' } }) { ... }`
|
|
52
|
+
query is ran, Magento also returns the Simple product and the Configurable
|
|
53
|
+
product the simple belongs to.
|
|
54
|
+
|
|
55
|
+
If that is the case we render the Configurable Product page instead of the
|
|
56
|
+
Simple Product page but the options to select the Simple Product are
|
|
57
|
+
pre-selected.
|
|
58
|
+
|
|
59
|
+
- #### `configurableVariantValues`
|
|
60
|
+
|
|
61
|
+
Options to configure which values will be replaced when a variant is selected
|
|
62
|
+
on the product page.
|
|
63
|
+
|
|
64
|
+
- #### `content: Boolean`
|
|
65
|
+
|
|
66
|
+
**Description:** Use the name, description, short description and meta data
|
|
67
|
+
from the configured variant
|
|
68
|
+
|
|
69
|
+
- #### `gallery: Boolean`
|
|
70
|
+
|
|
71
|
+
**Description:** This option enables the automatic update of product gallery
|
|
72
|
+
images on the product page when a variant is selected, provided that the
|
|
73
|
+
gallery images for the selected variant differ from the currently displayed
|
|
74
|
+
images.
|
|
75
|
+
|
|
76
|
+
- #### `url: Boolean`
|
|
77
|
+
|
|
78
|
+
**Description:** When a variant is selected the URL of the product will be
|
|
79
|
+
changed in the address bar.
|
|
80
|
+
|
|
81
|
+
**Note:** This only occurs when the actual variant can be accessed through
|
|
82
|
+
the URL.
|
|
83
|
+
|
|
84
|
+
## Magento configuration
|
|
85
|
+
|
|
86
|
+
### How should a Magento administrator configure the configurable and simple products to use this?
|
|
87
|
+
|
|
88
|
+
To make use of this features the Visibility of your product should be set to
|
|
89
|
+
**Catalog** or **Catalog, Search**. Or else the data is not accessible.
|
|
90
|
+
|
|
91
|
+
> `Catalog -> Products -> [product] -> Visibility: [Catalog / Catalog, Search]`
|
|
92
|
+
|
|
93
|
+
## Next steps
|
|
94
|
+
|
|
95
|
+
- [Overview](./readme)
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@graphcommerce/docs",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/docs",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce/docs",
|
|
5
|
-
"version": "6.2.0-canary.
|
|
5
|
+
"version": "6.2.0-canary.87",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.87"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|