@graphcommerce/docs 8.0.1 → 8.0.2-canary.2
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 +16 -0
- package/feature-list.md +8 -6
- package/framework/config.md +6 -2
- package/framework/translations.md +4 -0
- package/framework/troubleshooting.md +10 -20
- package/getting-started/create.md +1 -0
- package/magento/multi-store-language-and-website.md +100 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.0.2-canary.2
|
|
4
|
+
|
|
5
|
+
## 8.0.2-canary.1
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2193](https://github.com/graphcommerce-org/graphcommerce/pull/2193) [`317250a`](https://github.com/graphcommerce-org/graphcommerce/commit/317250a580b9f0b5175d9df93ba2cf62193ea383) - Updated docs to reflect featurelist more accurately
|
|
10
|
+
([@paales](https://github.com/paales))
|
|
11
|
+
|
|
12
|
+
## 8.0.2-canary.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#2195](https://github.com/graphcommerce-org/graphcommerce/pull/2195) [`207cd41`](https://github.com/graphcommerce-org/graphcommerce/commit/207cd4147621e53353b0b354c80d575df78089f0) - Documentation on multistore setup added
|
|
17
|
+
([@paales](https://github.com/paales))
|
|
18
|
+
|
|
3
19
|
## 8.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/feature-list.md
CHANGED
|
@@ -87,15 +87,15 @@ Features taken from the Magento Commerce 2 Feature List
|
|
|
87
87
|
- [x] Blend content and commerce by adding products to content pages and rich
|
|
88
88
|
content to product pages. — [Enhanced]
|
|
89
89
|
- [x] Create reusable dynamic blocks targeted to customer segments. — [Commerce]
|
|
90
|
-
- [x] Easily stage and preview content for seamless updates. — [
|
|
91
|
-
- [x] Manage upcoming site changes with a timeline dashboard.
|
|
90
|
+
- [x] Easily stage and preview content for seamless updates. — [Partial]
|
|
91
|
+
- [x] Manage upcoming site changes with a timeline dashboard. - [Commerce]
|
|
92
92
|
- [x] Organize content pages and add pagination, navigation, and menus with a
|
|
93
93
|
page hierarchy tool. — [Enhanced]
|
|
94
94
|
- [x] Track and restore previous versions of content pages. — [Enhanced]
|
|
95
95
|
- [x] Engage customers with exciting imagery from Adobe Stock, straight from
|
|
96
96
|
your Adobe Commerce instance.
|
|
97
97
|
- [x] Save content and layouts as templates. Apply them to new areas across
|
|
98
|
-
sites and store views.
|
|
98
|
+
sites and store views.
|
|
99
99
|
- [x] Provide creatives, designers, and agencies with direct, controlled access
|
|
100
100
|
to the Media Gallery.
|
|
101
101
|
|
|
@@ -214,7 +214,7 @@ Features taken from the Magento Commerce 2 Feature List
|
|
|
214
214
|
### Checkout
|
|
215
215
|
|
|
216
216
|
- [x] Include a mini cart on store pages to summarize products in the cart.
|
|
217
|
-
- [x] Display an order summary with product images in checkout.
|
|
217
|
+
- [x] Display an order summary with product images in checkout. [Todo]
|
|
218
218
|
- [x] Offer guest and registered user checkout. Registered customers are
|
|
219
219
|
automatically recognized when they enter their email addresses.
|
|
220
220
|
- [ ] Boost conversion rates with an Instant Purchase option that uses saved
|
|
@@ -382,7 +382,7 @@ Features taken from the Magento Commerce 2 Feature List
|
|
|
382
382
|
APIs with REST and GraphQL support. — [Enhanced]
|
|
383
383
|
- [x] Smoothly manage interactions between extensions using plug-ins and
|
|
384
384
|
dependency injection software design patterns. —
|
|
385
|
-
[Plugins](https://www.graphcommerce.org/docs/framework/plugins-
|
|
385
|
+
[Plugins](https://www.graphcommerce.org/docs/framework/plugins-react)
|
|
386
386
|
- [ ] Accelerate time-to-market and improve code quality with a fully-automated
|
|
387
387
|
testing framework.
|
|
388
388
|
- [ ] Update code with a standalone installer that checks for prerequisites
|
|
@@ -404,10 +404,12 @@ Features taken from the Magento Commerce 2 Feature List
|
|
|
404
404
|
- [x] Feel confident with regular scanning, external penetration testing, and
|
|
405
405
|
bug bounty programs that promote core platform security.
|
|
406
406
|
- [x] Stay informed about security issues through the Adobe Security Center and
|
|
407
|
-
mailing list.
|
|
407
|
+
mailing list. [Commerce]
|
|
408
408
|
- [x] Prevent private data from sending to third parties with Egress Filtering.
|
|
409
|
+
[Commerce]
|
|
409
410
|
- [x] Support for leading iPaaS platforms to enable enterprise integrations
|
|
410
411
|
- [x] Optimize your upgrade process with the Upgrade Compatibility Tool.
|
|
412
|
+
[Commerce]
|
|
411
413
|
|
|
412
414
|
### Layout and theming
|
|
413
415
|
|
package/framework/config.md
CHANGED
|
@@ -334,7 +334,9 @@ All storefront configuration for the project
|
|
|
334
334
|
|
|
335
335
|
#### locale: string (required)
|
|
336
336
|
|
|
337
|
-
Must be a locale string
|
|
337
|
+
Must be a [locale string](https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers) for automatic redirects to work.
|
|
338
|
+
|
|
339
|
+
This value can be used as a sub-path identifier only, make sure linguiLocale is configured for each URL.
|
|
338
340
|
|
|
339
341
|
#### magentoStoreCode: string (required)
|
|
340
342
|
|
|
@@ -390,7 +392,9 @@ Add a gcms-locales header to make sure queries return in a certain language, can
|
|
|
390
392
|
|
|
391
393
|
#### linguiLocale: string
|
|
392
394
|
|
|
393
|
-
Specify a custom locale for to load translations.
|
|
395
|
+
Specify a custom locale for to load translations. Must be lowercase valid locale.
|
|
396
|
+
|
|
397
|
+
This value is also used for the Intl.
|
|
394
398
|
|
|
395
399
|
### MagentoConfigurableVariantValues
|
|
396
400
|
|
|
@@ -215,6 +215,10 @@ msgstr ""
|
|
|
215
215
|
> suggestions in VS Code with the
|
|
216
216
|
> [Github copilot extention ↗](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot).
|
|
217
217
|
|
|
218
|
+
## Use country specific locales like `en-us` and `en-gb`
|
|
219
|
+
|
|
220
|
+
Configure `linguiLocale` in the storefront config.
|
|
221
|
+
|
|
218
222
|
## Next steps
|
|
219
223
|
|
|
220
224
|
- Learn more about
|
|
@@ -5,17 +5,24 @@
|
|
|
5
5
|
If any errors are detected during the build phase, the console and browser will
|
|
6
6
|
display an error message. Common causes for errors are:
|
|
7
7
|
|
|
8
|
+
```bash
|
|
9
|
+
[next] [GraphQL Errors] failed to fetch to https://magento.test/graphql products
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
You are connecting with a local endpoint with a self signed SSL certicate, start
|
|
13
|
+
your dev server with `NODE_TLS_REJECT_UNAUTHORIZED=0 yarn dev`
|
|
14
|
+
|
|
8
15
|
```bash
|
|
9
16
|
[next] 🕸️ - m2: Failed to generate schema: request to [...] failed, reason: connect ETIMEDOUT
|
|
10
17
|
```
|
|
11
18
|
|
|
12
|
-
Missing
|
|
19
|
+
Missing `magentoEndpoint` in your graphcommerce.config.js
|
|
13
20
|
|
|
14
21
|
```bash
|
|
15
22
|
🕸️ - m2: Failed to generate schema: invalid json response body at [...] reason: Unexpected '<'
|
|
16
23
|
```
|
|
17
24
|
|
|
18
|
-
|
|
25
|
+
`magentoEndpoint` environment variable is not pointing to a Magento graphql
|
|
19
26
|
endpoint
|
|
20
27
|
|
|
21
28
|
```bash
|
|
@@ -28,24 +35,7 @@ The Magento version is outdated. Make sure you are running Magento 2.4.3 and up
|
|
|
28
35
|
Error: Invalid src prop ([...]) on 'next/image', hostname "[...]" is not configured under images in your 'next.config.js'
|
|
29
36
|
```
|
|
30
37
|
|
|
31
|
-
Add the image domain to
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
File /[...]/node_modules/@graphcommerce/magento-payment-braint
|
|
35
|
-
ree/hooks/UseBraintree.graphql caused error: Unable to find field "createBraintreeClientToken" on type "Mutation"!
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Remove "@graphcommerce/magento-payment-braintree" from your dependencies in
|
|
39
|
-
package.json. Run `yarn` to update dependencies, then run `yarn dev`.
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
File /[...]/node_modules/@graphcommerce/mollie-magento-payment
|
|
43
|
-
/components/MolliePlaceOrder/MolliePlaceOrder.graphql caused error: Unable to
|
|
44
|
-
find field "mollie_redirect_url" on type "Order"!
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Remove "@graphcommerce/mollie-magento-payment" from your dependencies in
|
|
48
|
-
package.json. Run `yarn` to update dependencies, then run `yarn dev`.
|
|
38
|
+
Add the image domain to the next.config.js
|
|
49
39
|
|
|
50
40
|
```bash
|
|
51
41
|
node_modules/@graphcommerce/graphql/generated/fragments.json
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Multi store, language and website setup
|
|
2
|
+
|
|
3
|
+
GraphCommerce builds on top of the
|
|
4
|
+
[Next.js internationalization feature](https://nextjs.org/docs/pages/building-your-application/routing/internationalization#getting-started).
|
|
5
|
+
|
|
6
|
+
## Sub-path routing
|
|
7
|
+
|
|
8
|
+
Locales are UTS Locale Identifiers, a standardized format for defining locales.
|
|
9
|
+
|
|
10
|
+
Generally a Locale Identifier is made up of a language, region, and script
|
|
11
|
+
separated by a dash: `language-region-script`. The region and script are
|
|
12
|
+
optional. An example how to configure it in GraphCommerce:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
const config = {
|
|
16
|
+
storefront: [
|
|
17
|
+
{ locale: 'en-US', defaultLocale: true },
|
|
18
|
+
{ locale: 'nl-NL' },
|
|
19
|
+
{ locale: 'de' },
|
|
20
|
+
],
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This will result in the following URLs:
|
|
25
|
+
|
|
26
|
+
- `https://www.graphcommerce.org/some-path/here`
|
|
27
|
+
- `https://www.graphcommerce.org/nl-NL/some-path/here`
|
|
28
|
+
- `https://www.graphcommerce.org/de/some-path/here`
|
|
29
|
+
|
|
30
|
+
## Domain routing
|
|
31
|
+
|
|
32
|
+
The domains can be subdomains or top-level domains. The configuration is the
|
|
33
|
+
same for both.
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
const config = {
|
|
37
|
+
storefront: [
|
|
38
|
+
{ domain: 'www.graphcommerce.org', locale: 'en-US', defaultLocale: true },
|
|
39
|
+
{ domain: 'www.graphcommerce.org', locale: 'fr' },
|
|
40
|
+
{ domain: 'www.graphcommerce.nl', locale: 'nl-NL' },
|
|
41
|
+
{ domain: 'de.graphcommerce.org', locale: 'de-DE' },
|
|
42
|
+
],
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This will result in the following URLs:
|
|
47
|
+
|
|
48
|
+
- `https://www.graphcommerce.org/some-path/here`
|
|
49
|
+
- `https://www.graphcommerce.org/fr/some-path/here`
|
|
50
|
+
- `https://www.graphcommerce.nl/some-path/here`
|
|
51
|
+
- `https://de.graphcommerce.org/some-path/here`
|
|
52
|
+
|
|
53
|
+
## Domain routing + same locale
|
|
54
|
+
|
|
55
|
+
Next.js does not allow reusing locales (even if it is on different domains), to
|
|
56
|
+
work around this, we're using the fact that a locale is allowed to have a
|
|
57
|
+
'script' value in the format: `language-region-script`. We use this part to
|
|
58
|
+
differentiate between the same locales on different domains.
|
|
59
|
+
|
|
60
|
+
Configuring the `linguiLocale` makes sure the correct translation file is loaded
|
|
61
|
+
here.
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
const config = {
|
|
65
|
+
storefront: [
|
|
66
|
+
{ domain: 'domain1.com', locale: 'en-us-domain1', linguiLocale: 'en' },
|
|
67
|
+
{ domain: 'domain2.com', locale: 'en-us-domain2', linguiLocale: 'en' },
|
|
68
|
+
{ domain: 'domain3.com', locale: 'en-us-domain3', linguiLocale: 'en' },
|
|
69
|
+
],
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Separating Sub-paths from locales
|
|
74
|
+
|
|
75
|
+
Note: Available from GraphCommerce 8.1.0
|
|
76
|
+
|
|
77
|
+
Warning: Separating paths form locales will break Next.js' automatic redirect
|
|
78
|
+
functionality.
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
const config = {
|
|
82
|
+
storefront: [
|
|
83
|
+
{ locale: 'default', linguiLocale: 'en', defaultLocale: true },
|
|
84
|
+
{ locale: 'fr_fr', linguiLocale: 'fr' },
|
|
85
|
+
{ locale: 'nl_nl', linguiLocale: 'nl' },
|
|
86
|
+
],
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This will result in the following URLs:
|
|
91
|
+
|
|
92
|
+
- `https://www.graphcommerce.org/some-path/here`
|
|
93
|
+
- `https://www.graphcommerce.org/fr_fr/some-path/here`
|
|
94
|
+
- `https://www.graphcommerce.org/nl_nl/some-path/here`
|
|
95
|
+
|
|
96
|
+
## Further reading
|
|
97
|
+
|
|
98
|
+
- [Next.js docs: Prefixing the default locale](https://nextjs.org/docs/pages/building-your-application/routing/internationalization#prefixing-the-default-locale)
|
|
99
|
+
- [Next.js docs: Sub-path routing](https://nextjs.org/docs/pages/building-your-application/routing/internationalization#sub-path-routing).
|
|
100
|
+
- [Next.js docs: Domain routing](https://nextjs.org/docs/pages/building-your-application/routing/internationalization#domain-routing)
|
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": "8.0.
|
|
5
|
+
"version": "8.0.2-canary.2",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "^8.0.
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.2-canary.2"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|