@graphcommerce/docs 7.1.0-canary.9 → 8.0.0-canary.69
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 +132 -8
- package/contributing.md +1 -1
- package/framework/config.md +88 -50
- package/framework/plugins-react.md +1 -1
- package/hygraph/property-picker.md +45 -0
- package/magento/implementing-payment-gateways.md +16 -15
- package/magento/known-issues.md +29 -0
- package/magento/patches/cart-error-category.patch +46 -0
- package/magento/readme.md +7 -10
- package/package.json +3 -3
- package/upgrading/graphcommerce-5-to-6.md +2 -3
- package/upgrading/graphcommerce-7-to-8.md +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,129 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.0.0-canary.69
|
|
4
|
+
|
|
5
|
+
## 7.1.0-canary.68
|
|
6
|
+
|
|
7
|
+
## 7.1.0-canary.67
|
|
8
|
+
|
|
9
|
+
## 7.1.0-canary.66
|
|
10
|
+
|
|
11
|
+
## 7.1.0-canary.65
|
|
12
|
+
|
|
13
|
+
## 7.1.0-canary.64
|
|
14
|
+
|
|
15
|
+
## 7.1.0-canary.63
|
|
16
|
+
|
|
17
|
+
## 7.1.0-canary.62
|
|
18
|
+
|
|
19
|
+
## 7.1.0-canary.61
|
|
20
|
+
|
|
21
|
+
## 7.1.0-canary.60
|
|
22
|
+
|
|
23
|
+
## 7.1.0-canary.59
|
|
24
|
+
|
|
25
|
+
## 7.1.0-canary.58
|
|
26
|
+
|
|
27
|
+
## 7.1.0-canary.57
|
|
28
|
+
|
|
29
|
+
## 7.1.0-canary.56
|
|
30
|
+
|
|
31
|
+
## 7.1.0-canary.55
|
|
32
|
+
|
|
33
|
+
## 7.1.0-canary.54
|
|
34
|
+
|
|
35
|
+
## 7.1.0-canary.53
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- [#2119](https://github.com/graphcommerce-org/graphcommerce/pull/2119) [`6adb2e72e`](https://github.com/graphcommerce-org/graphcommerce/commit/6adb2e72ece8210757ced178779dfba11b1bcf55) - Clarify texts by adding formatting and correcting spelling. ([@carlocarels90](https://github.com/carlocarels90))
|
|
40
|
+
|
|
41
|
+
## 7.1.0-canary.52
|
|
42
|
+
|
|
43
|
+
## 7.1.0-canary.51
|
|
44
|
+
|
|
45
|
+
## 7.1.0-canary.50
|
|
46
|
+
|
|
47
|
+
## 7.1.0-canary.49
|
|
48
|
+
|
|
49
|
+
## 7.1.0-canary.48
|
|
50
|
+
|
|
51
|
+
## 7.1.0-canary.47
|
|
52
|
+
|
|
53
|
+
## 7.1.0-canary.46
|
|
54
|
+
|
|
55
|
+
## 7.1.0-canary.45
|
|
56
|
+
|
|
57
|
+
## 7.1.0-canary.38
|
|
58
|
+
|
|
59
|
+
## 7.1.0-canary.37
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- [#2112](https://github.com/graphcommerce-org/graphcommerce/pull/2112) [`15a203737`](https://github.com/graphcommerce-org/graphcommerce/commit/15a2037372cd615602d3e2f3deedba9766fc172c) - Make the "Search" string translatable and fix typo. ([@carlocarels90](https://github.com/carlocarels90))
|
|
64
|
+
|
|
65
|
+
## 7.1.0-canary.36
|
|
66
|
+
|
|
67
|
+
## 7.1.0-canary.35
|
|
68
|
+
|
|
69
|
+
## 7.1.0-canary.34
|
|
70
|
+
|
|
71
|
+
## 7.1.0-canary.33
|
|
72
|
+
|
|
73
|
+
## 7.1.0-canary.32
|
|
74
|
+
|
|
75
|
+
## 7.1.0-canary.31
|
|
76
|
+
|
|
77
|
+
### Minor Changes
|
|
78
|
+
|
|
79
|
+
- [#2106](https://github.com/graphcommerce-org/graphcommerce/pull/2106) [`9f8c3cac2`](https://github.com/graphcommerce-org/graphcommerce/commit/9f8c3cac214006315055f37cf8d4a783eb99a7ec) - Split off Magento known issues to separate page ([@hnsr](https://github.com/hnsr))
|
|
80
|
+
|
|
81
|
+
## 7.1.0-canary.30
|
|
82
|
+
|
|
83
|
+
## 7.1.0-canary.29
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- [#2104](https://github.com/graphcommerce-org/graphcommerce/pull/2104) [`d0f1f5a2d`](https://github.com/graphcommerce-org/graphcommerce/commit/d0f1f5a2d1380d1c3931e23218924d5e8b1fc60d) - Document workaround/patch for broken cart error handling with Magento 2.4.6. ([@hnsr](https://github.com/hnsr))
|
|
88
|
+
|
|
89
|
+
## 7.1.0-canary.28
|
|
90
|
+
|
|
91
|
+
## 7.1.0-canary.27
|
|
92
|
+
|
|
93
|
+
## 7.1.0-canary.26
|
|
94
|
+
|
|
95
|
+
## 7.1.0-canary.25
|
|
96
|
+
|
|
97
|
+
## 7.1.0-canary.24
|
|
98
|
+
|
|
99
|
+
## 7.1.0-canary.23
|
|
100
|
+
|
|
101
|
+
## 7.1.0-canary.22
|
|
102
|
+
|
|
103
|
+
## 7.1.0-canary.21
|
|
104
|
+
|
|
105
|
+
## 7.1.0-canary.20
|
|
106
|
+
|
|
107
|
+
## 7.1.0-canary.19
|
|
108
|
+
|
|
109
|
+
## 7.1.0-canary.18
|
|
110
|
+
|
|
111
|
+
## 7.1.0-canary.17
|
|
112
|
+
|
|
113
|
+
## 7.1.0-canary.16
|
|
114
|
+
|
|
115
|
+
## 7.1.0-canary.15
|
|
116
|
+
|
|
117
|
+
## 7.1.0-canary.14
|
|
118
|
+
|
|
119
|
+
## 7.1.0-canary.13
|
|
120
|
+
|
|
121
|
+
## 7.1.0-canary.12
|
|
122
|
+
|
|
123
|
+
## 7.1.0-canary.11
|
|
124
|
+
|
|
125
|
+
## 7.1.0-canary.10
|
|
126
|
+
|
|
3
127
|
## 7.1.0-canary.9
|
|
4
128
|
|
|
5
129
|
## 7.1.0-canary.8
|
|
@@ -825,31 +949,31 @@
|
|
|
825
949
|
All occurences of `<Trans>` and `t` need to be replaced:
|
|
826
950
|
|
|
827
951
|
```tsx
|
|
828
|
-
import { Trans, t } from
|
|
952
|
+
import { Trans, t } from "@lingui/macro";
|
|
829
953
|
|
|
830
954
|
function MyComponent() {
|
|
831
|
-
const foo =
|
|
955
|
+
const foo = "bar";
|
|
832
956
|
return (
|
|
833
957
|
<div aria-label={t`Account ${foo}`}>
|
|
834
958
|
<Trans>My Translation {foo}</Trans>
|
|
835
959
|
</div>
|
|
836
|
-
)
|
|
960
|
+
);
|
|
837
961
|
}
|
|
838
962
|
```
|
|
839
963
|
|
|
840
964
|
Needs to be replaced with:
|
|
841
965
|
|
|
842
966
|
```tsx
|
|
843
|
-
import { Trans } from
|
|
844
|
-
import { i18n } from
|
|
967
|
+
import { Trans } from "@lingui/react";
|
|
968
|
+
import { i18n } from "@lingui/core";
|
|
845
969
|
|
|
846
970
|
function MyComponent() {
|
|
847
|
-
const foo =
|
|
971
|
+
const foo = "bar";
|
|
848
972
|
return (
|
|
849
973
|
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
850
|
-
<Trans key=
|
|
974
|
+
<Trans key="My Translation {foo}" values={{ foo }}></Trans>
|
|
851
975
|
</div>
|
|
852
|
-
)
|
|
976
|
+
);
|
|
853
977
|
}
|
|
854
978
|
```
|
|
855
979
|
|
package/contributing.md
CHANGED
|
@@ -7,7 +7,7 @@ process easy and effective for everyone involved.
|
|
|
7
7
|
|
|
8
8
|
### Bug reports
|
|
9
9
|
|
|
10
|
-
Well-written,
|
|
10
|
+
Well-written, through bug reports are a great way to contribute to the project.
|
|
11
11
|
Before raising a new issue, please check our
|
|
12
12
|
[issues list ↗](https://github.com/graphcommerce-org/graphcommerce/issues) to
|
|
13
13
|
determine whether the issue you encountered has already been reported.
|
package/framework/config.md
CHANGED
|
@@ -77,7 +77,7 @@ Below is a list of all possible configurations that can be set by GraphCommerce.
|
|
|
77
77
|
|
|
78
78
|
### GraphCommerceConfig
|
|
79
79
|
|
|
80
|
-
####
|
|
80
|
+
#### canonicalBaseUrl: string (required)
|
|
81
81
|
|
|
82
82
|
The canonical base URL is used for SEO purposes.
|
|
83
83
|
|
|
@@ -86,7 +86,7 @@ Examples:
|
|
|
86
86
|
- https://example.com/en
|
|
87
87
|
- https://example.com/en-US
|
|
88
88
|
|
|
89
|
-
####
|
|
89
|
+
#### hygraphEndpoint: string (required)
|
|
90
90
|
|
|
91
91
|
The HyGraph endpoint.
|
|
92
92
|
|
|
@@ -94,33 +94,33 @@ The HyGraph endpoint.
|
|
|
94
94
|
|
|
95
95
|
Project settings -> API Access -> High Performance Read-only Content API
|
|
96
96
|
|
|
97
|
-
####
|
|
97
|
+
#### magentoEndpoint: string (required)
|
|
98
98
|
|
|
99
99
|
GraphQL Magento endpoint.
|
|
100
100
|
|
|
101
101
|
Examples:
|
|
102
102
|
- https://magento2.test/graphql
|
|
103
103
|
|
|
104
|
-
####
|
|
104
|
+
#### storefront: [GraphCommerceStorefrontConfig](#GraphCommerceStorefrontConfig)[] (required)
|
|
105
105
|
|
|
106
106
|
All storefront configuration for the project
|
|
107
107
|
|
|
108
|
-
####
|
|
108
|
+
#### cartDisplayPricesInclTax: boolean
|
|
109
109
|
|
|
110
110
|
Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax.
|
|
111
111
|
|
|
112
112
|
When Magento's StoreConfig adds this value, this can be replaced.
|
|
113
113
|
|
|
114
|
-
####
|
|
114
|
+
#### compare: boolean
|
|
115
115
|
|
|
116
116
|
Use compare functionality
|
|
117
117
|
|
|
118
|
-
####
|
|
118
|
+
#### compareVariant: 'CHECKBOX' | 'ICON' = 'ICON'
|
|
119
119
|
|
|
120
120
|
By default the compare feature is denoted with a 'compare ICON' (2 arrows facing one another).
|
|
121
121
|
This may be fine for experienced users, but for more clarity it's also possible to present the compare feature as a CHECKBOX accompanied by the 'Compare' label
|
|
122
122
|
|
|
123
|
-
####
|
|
123
|
+
#### configurableVariantForSimple: boolean = false
|
|
124
124
|
|
|
125
125
|
If a simple product is part of a Configurable product page, should the simple product be
|
|
126
126
|
rendered as a configured option of the configurable product page?
|
|
@@ -133,25 +133,25 @@ Magento also returns the Simple product and the Configurable product the simple
|
|
|
133
133
|
If that is the case we render the configurable product page instead of the simple product page but
|
|
134
134
|
the options to select the simple product are pre-selected.
|
|
135
135
|
|
|
136
|
-
####
|
|
136
|
+
#### configurableVariantValues: [MagentoConfigurableVariantValues](#MagentoConfigurableVariantValues) = { content: true, url: true }
|
|
137
137
|
|
|
138
138
|
When a user selects a variant, it will switch the values on the configurable page with the values of the configured variant.
|
|
139
139
|
|
|
140
140
|
Enabling options here will allow switching of those variants.
|
|
141
141
|
|
|
142
|
-
####
|
|
142
|
+
#### crossSellsHideCartItems: boolean = false
|
|
143
143
|
|
|
144
144
|
Determines if cross sell items should be shown when the user already has the product in their cart. This will result in a product will popping off the screen when you add it to the cart.
|
|
145
145
|
|
|
146
146
|
Default: 'false'
|
|
147
147
|
|
|
148
|
-
####
|
|
148
|
+
#### crossSellsRedirectItems: boolean = false
|
|
149
149
|
|
|
150
150
|
Determines if, after adding a cross-sell item to the cart, the user should be redirected to the cross-sell items of the product they just added.
|
|
151
151
|
|
|
152
152
|
Default: 'false'
|
|
153
153
|
|
|
154
|
-
####
|
|
154
|
+
#### customerRequireEmailConfirmation: boolean
|
|
155
155
|
|
|
156
156
|
Due to a limitation in the GraphQL API of Magento 2, we need to know if the
|
|
157
157
|
customer requires email confirmation.
|
|
@@ -159,11 +159,11 @@ customer requires email confirmation.
|
|
|
159
159
|
This value should match Magento 2's configuration value for
|
|
160
160
|
`customer/create_account/confirm` and should be removed once we can query
|
|
161
161
|
|
|
162
|
-
####
|
|
162
|
+
#### debug: [GraphCommerceDebugConfig](#GraphCommerceDebugConfig)
|
|
163
163
|
|
|
164
164
|
Debug configuration for GraphCommerce
|
|
165
165
|
|
|
166
|
-
####
|
|
166
|
+
#### demoMode: boolean = true
|
|
167
167
|
|
|
168
168
|
Enables some demo specific code that is probably not useful for a project:
|
|
169
169
|
|
|
@@ -171,7 +171,17 @@ Enables some demo specific code that is probably not useful for a project:
|
|
|
171
171
|
- Adds "dominant_color" attribute swatches to the product list items.
|
|
172
172
|
- Creates a big list items in the product list.
|
|
173
173
|
|
|
174
|
-
####
|
|
174
|
+
#### enableGuestCheckoutLogin: boolean
|
|
175
|
+
|
|
176
|
+
Enable Guest Checkout Login:
|
|
177
|
+
During customer login, GraphCommerce queries Magento to determine whether
|
|
178
|
+
the customer account already exists or not. If not, the sign-up form is shown instead.
|
|
179
|
+
|
|
180
|
+
For Magento versions, 2.4.7, 2.4.6-p1 and up, 2.4.5-p3 and up, 2.4.4-p4 and up, the following setting must be set to Yes
|
|
181
|
+
|
|
182
|
+
`Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout Login`
|
|
183
|
+
|
|
184
|
+
#### googleAnalyticsId: string
|
|
175
185
|
|
|
176
186
|
See https://support.google.com/analytics/answer/9539598?hl=en
|
|
177
187
|
|
|
@@ -179,7 +189,7 @@ Provide a value to enable Google Analytics for your store.
|
|
|
179
189
|
|
|
180
190
|
To override the value for a specific locale, configure in i18n config.
|
|
181
191
|
|
|
182
|
-
####
|
|
192
|
+
#### googleRecaptchaKey: string
|
|
183
193
|
|
|
184
194
|
Google reCAPTCHA site key.
|
|
185
195
|
When using reCAPTCHA, this value is required, even if you are configuring different values for each locale.
|
|
@@ -189,17 +199,17 @@ Get a site key and a secret key from https://developers.google.com/recaptcha/doc
|
|
|
189
199
|
The secret key should be added in the Magento admin panel (Stores > Configuration > Security > Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible)
|
|
190
200
|
ReCAPTCHA can then be enabled/disabled for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA Storefront > Storefront)
|
|
191
201
|
|
|
192
|
-
####
|
|
202
|
+
#### googleTagmanagerId: string
|
|
193
203
|
|
|
194
204
|
The Google Tagmanager ID to be used on the site.
|
|
195
205
|
|
|
196
206
|
This value is required even if you are configuring different values for each locale.
|
|
197
207
|
|
|
198
|
-
####
|
|
208
|
+
#### hygraphProjectId: string
|
|
199
209
|
|
|
200
210
|
Hygraph Project ID. **Only used for migrations.**
|
|
201
211
|
|
|
202
|
-
####
|
|
212
|
+
#### hygraphWriteAccessEndpoint: string
|
|
203
213
|
|
|
204
214
|
Content API. **Only used for migrations.**
|
|
205
215
|
|
|
@@ -207,7 +217,7 @@ Content API. **Only used for migrations.**
|
|
|
207
217
|
|
|
208
218
|
Project settings -> API Access -> Content API
|
|
209
219
|
|
|
210
|
-
####
|
|
220
|
+
#### hygraphWriteAccessToken: string
|
|
211
221
|
|
|
212
222
|
Hygraph Management SDK Authorization Token. **Only used for migrations.**
|
|
213
223
|
|
|
@@ -239,7 +249,7 @@ GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph"
|
|
|
239
249
|
yarn graphcommerce hygraph-migrate
|
|
240
250
|
```
|
|
241
251
|
|
|
242
|
-
####
|
|
252
|
+
#### legacyProductRoute: boolean
|
|
243
253
|
|
|
244
254
|
On older versions of GraphCommerce products would use a product type specific route.
|
|
245
255
|
|
|
@@ -247,45 +257,49 @@ This should only be set to true if you use the /product/[url] AND /product/confi
|
|
|
247
257
|
|
|
248
258
|
@deprecated Will be removed in a future version. [migration](../upgrading/graphcommerce-5-to-6.md#product-routing-changes)
|
|
249
259
|
|
|
250
|
-
####
|
|
260
|
+
#### limitSsg: boolean
|
|
251
261
|
|
|
252
262
|
Limit the static generation of SSG when building
|
|
253
263
|
|
|
254
|
-
####
|
|
264
|
+
#### previewSecret: string
|
|
255
265
|
|
|
256
266
|
To enable next.js' preview mode, configure the secret you'd like to use.
|
|
257
267
|
|
|
258
|
-
####
|
|
268
|
+
#### productFiltersLayout: 'DEFAULT' | 'SIDEBAR' = 'DEFAULT'
|
|
259
269
|
|
|
260
270
|
Layout how the filters are rendered.
|
|
261
271
|
DEFAULT: Will be rendered as horzontal chips on desktop and mobile
|
|
262
272
|
SIDEBAR: Will be rendered as a sidebar on desktop and horizontal chips on mobile
|
|
263
273
|
|
|
264
|
-
####
|
|
274
|
+
#### productFiltersPro: boolean
|
|
265
275
|
|
|
266
276
|
Product filters with better UI for mobile and desktop.
|
|
267
277
|
|
|
268
|
-
####
|
|
278
|
+
#### productRoute: string
|
|
269
279
|
|
|
270
280
|
By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
|
|
271
281
|
|
|
272
282
|
Default: '/p/'
|
|
273
283
|
Example: '/product/'
|
|
274
284
|
|
|
275
|
-
####
|
|
285
|
+
#### recentlyViewedProducts: [RecentlyViewedProductsConfig](#RecentlyViewedProductsConfig)
|
|
286
|
+
|
|
287
|
+
Settings for recently viewed products
|
|
288
|
+
|
|
289
|
+
#### robotsAllow: boolean
|
|
276
290
|
|
|
277
291
|
Allow the site to be indexed by search engines.
|
|
278
292
|
If false, the robots.txt file will be set to disallow all.
|
|
279
293
|
|
|
280
|
-
####
|
|
294
|
+
#### sidebarGallery: [SidebarGalleryConfig](#SidebarGalleryConfig)
|
|
281
295
|
|
|
282
|
-
|
|
296
|
+
Configuration for the SidebarGallery component
|
|
283
297
|
|
|
284
|
-
####
|
|
298
|
+
#### wishlistHideForGuests: boolean
|
|
285
299
|
|
|
286
|
-
|
|
300
|
+
Hide the wishlist functionality for guests.
|
|
287
301
|
|
|
288
|
-
####
|
|
302
|
+
#### wishlistShowFeedbackMessage: boolean
|
|
289
303
|
|
|
290
304
|
Show a message when the product is added to the wishlist.
|
|
291
305
|
|
|
@@ -293,18 +307,22 @@ Show a message when the product is added to the wishlist.
|
|
|
293
307
|
|
|
294
308
|
Debug configuration for GraphCommerce
|
|
295
309
|
|
|
296
|
-
####
|
|
310
|
+
#### pluginStatus: boolean
|
|
297
311
|
|
|
298
312
|
Reports which plugins are enabled or disabled.
|
|
299
313
|
|
|
300
|
-
####
|
|
314
|
+
#### sessions: boolean
|
|
315
|
+
|
|
316
|
+
Enable debugging interface to debug sessions
|
|
317
|
+
|
|
318
|
+
#### webpackCircularDependencyPlugin: boolean
|
|
301
319
|
|
|
302
320
|
Cyclic dependencies can cause memory issues and other strange bugs.
|
|
303
321
|
This plugin will warn you when it detects a cyclic dependency.
|
|
304
322
|
|
|
305
323
|
When running into memory issues, it can be useful to enable this plugin.
|
|
306
324
|
|
|
307
|
-
####
|
|
325
|
+
#### webpackDuplicatesPlugin: boolean
|
|
308
326
|
|
|
309
327
|
When updating packages it can happen that the same package is included with different versions in the same project.
|
|
310
328
|
|
|
@@ -316,11 +334,11 @@ Issues that this can cause are:
|
|
|
316
334
|
|
|
317
335
|
All storefront configuration for the project
|
|
318
336
|
|
|
319
|
-
####
|
|
337
|
+
#### locale: string (required)
|
|
320
338
|
|
|
321
339
|
Must be a locale string https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers
|
|
322
340
|
|
|
323
|
-
####
|
|
341
|
+
#### magentoStoreCode: string (required)
|
|
324
342
|
|
|
325
343
|
Magento store code.
|
|
326
344
|
|
|
@@ -331,7 +349,7 @@ Examples:
|
|
|
331
349
|
- en-us
|
|
332
350
|
- b2b-us
|
|
333
351
|
|
|
334
|
-
####
|
|
352
|
+
#### canonicalBaseUrl: string
|
|
335
353
|
|
|
336
354
|
The canonical base URL is used for SEO purposes.
|
|
337
355
|
|
|
@@ -340,39 +358,39 @@ Examples:
|
|
|
340
358
|
- https://example.com/en
|
|
341
359
|
- https://example.com/en-US
|
|
342
360
|
|
|
343
|
-
####
|
|
361
|
+
#### cartDisplayPricesInclTax: boolean
|
|
344
362
|
|
|
345
363
|
Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax.
|
|
346
364
|
|
|
347
|
-
####
|
|
365
|
+
#### defaultLocale: boolean
|
|
348
366
|
|
|
349
367
|
There can only be one entry with defaultLocale set to true.
|
|
350
368
|
- If there are more, the first one is used.
|
|
351
369
|
- If there is none, the first entry is used.
|
|
352
370
|
|
|
353
|
-
####
|
|
371
|
+
#### domain: string
|
|
354
372
|
|
|
355
373
|
Domain configuration, must be a domain https://tools.ietf.org/html/rfc3986
|
|
356
374
|
|
|
357
|
-
####
|
|
375
|
+
#### googleAnalyticsId: string
|
|
358
376
|
|
|
359
377
|
Configure different Google Analytics IDs for different locales.
|
|
360
378
|
|
|
361
379
|
To disable for a specific locale, set the value to null.
|
|
362
380
|
|
|
363
|
-
####
|
|
381
|
+
#### googleRecaptchaKey: string
|
|
364
382
|
|
|
365
383
|
Locale specific google reCAPTCHA key.
|
|
366
384
|
|
|
367
|
-
####
|
|
385
|
+
#### googleTagmanagerId: string
|
|
368
386
|
|
|
369
387
|
The Google Tagmanager ID to be used per locale.
|
|
370
388
|
|
|
371
|
-
####
|
|
389
|
+
#### hygraphLocales: string[]
|
|
372
390
|
|
|
373
391
|
Add a gcms-locales header to make sure queries return in a certain language, can be an array to define fallbacks.
|
|
374
392
|
|
|
375
|
-
####
|
|
393
|
+
#### linguiLocale: string
|
|
376
394
|
|
|
377
395
|
Specify a custom locale for to load translations.
|
|
378
396
|
|
|
@@ -380,17 +398,37 @@ Specify a custom locale for to load translations.
|
|
|
380
398
|
|
|
381
399
|
Options to configure which values will be replaced when a variant is selected on the product page.
|
|
382
400
|
|
|
383
|
-
####
|
|
401
|
+
#### content: boolean
|
|
384
402
|
|
|
385
403
|
Use the name, description, short description and meta data from the configured variant
|
|
386
404
|
|
|
387
|
-
####
|
|
405
|
+
#### gallery: boolean
|
|
388
406
|
|
|
389
407
|
This option enables the automatic update of product gallery images on the product page when a variant is selected,
|
|
390
408
|
provided that the gallery images for the selected variant differ from the currently displayed images.
|
|
391
409
|
|
|
392
|
-
####
|
|
410
|
+
#### url: boolean
|
|
393
411
|
|
|
394
412
|
When a variant is selected the URL of the product will be changed in the address bar.
|
|
395
413
|
|
|
396
|
-
This only happens when the actual variant is can be accessed by the URL.
|
|
414
|
+
This only happens when the actual variant is can be accessed by the URL.
|
|
415
|
+
|
|
416
|
+
### RecentlyViewedProductsConfig
|
|
417
|
+
|
|
418
|
+
Settings for recently viewed products
|
|
419
|
+
|
|
420
|
+
#### enabled: boolean
|
|
421
|
+
|
|
422
|
+
Enable/disable recently viewed products
|
|
423
|
+
|
|
424
|
+
#### maxCount: number
|
|
425
|
+
|
|
426
|
+
Number of recently viewed products to be stored in localStorage
|
|
427
|
+
|
|
428
|
+
### SidebarGalleryConfig
|
|
429
|
+
|
|
430
|
+
SidebarGalleryConfig will contain all configuration values for the Sidebar Gallery component.
|
|
431
|
+
|
|
432
|
+
#### paginationVariant: 'DOTS' | 'THUMBNAILS_BOTTOM'
|
|
433
|
+
|
|
434
|
+
Variant used for the pagination
|
|
@@ -37,7 +37,7 @@ Function plugins, which can be used to:
|
|
|
37
37
|
|
|
38
38
|
In this example we're going to add some text to list items, just like the text
|
|
39
39
|
‘BY GC’ that can seen in the demo on
|
|
40
|
-
[category pages](https://graphcommerce.vercel.app/
|
|
40
|
+
[category pages](https://graphcommerce.vercel.app/en/women/business).
|
|
41
41
|
|
|
42
42
|
1. Create a new file in `/plugins/ProductListItemByGC.tsx` with the following
|
|
43
43
|
contents:
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Hygraph Dynamic Rows
|
|
2
|
+
|
|
3
|
+
As you might have learned, Dynamic Rows enable the addition of rows across
|
|
4
|
+
multiple pages through rule-based relationships, rather than manually adding a
|
|
5
|
+
row to each page. These rules hinge on shared attributes among the pages, with a
|
|
6
|
+
category being a typical example of such an attribute. To enable the Dynamic Row
|
|
7
|
+
UI Extension, follow the installation instructions as below.
|
|
8
|
+
|
|
9
|
+
> Installation
|
|
10
|
+
>
|
|
11
|
+
> [Click here to install the Dynamic Row UI Extension](https://app.hygraph.com/apps/dynamic-row-property-picker/new)
|
|
12
|
+
|
|
13
|
+
<img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/3226eedb-e58c-4d3f-9516-14ff6ed56f24">
|
|
14
|
+
|
|
15
|
+
## Enabling the Application
|
|
16
|
+
|
|
17
|
+
Once you click the link and authorize the application, you'll be taken to the
|
|
18
|
+
app's configuration page. On this page, you can switch the application on or off
|
|
19
|
+
as needed.
|
|
20
|
+
|
|
21
|
+
<img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/ec9b55f6-14f6-466e-8a31-0b893ffe1297">
|
|
22
|
+
|
|
23
|
+
## Enabling the field
|
|
24
|
+
|
|
25
|
+
Now to enable the field, go to your Hygraph schema. Under components you should
|
|
26
|
+
have a `Text` and `Number` component. Each of these have a field with api ID
|
|
27
|
+
`property`. You will have to delete this field in both components. This will
|
|
28
|
+
result in current field data being lost, so in case you are migrating to the
|
|
29
|
+
extended UI, make sure to have a copy of those fields somewhere else.
|
|
30
|
+
|
|
31
|
+
> Note
|
|
32
|
+
>
|
|
33
|
+
> Make sure you migrated your schema to Graphcommerce 7.0 with
|
|
34
|
+
> [our Hygraph-CLI.](./cli.md)
|
|
35
|
+
|
|
36
|
+
Replace the existing fields with the new `Property picker` field in the right sidebar
|
|
37
|
+
(it should be under `Slug` and above `Rich text`). While adding the
|
|
38
|
+
`Property picker` field make sure that you make it `required`.
|
|
39
|
+
|
|
40
|
+
<img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/9206f86d-477c-4eaf-bec6-1648874bee5e">
|
|
41
|
+
|
|
42
|
+
## Start building with your new Dynamic Rows UI!
|
|
43
|
+
|
|
44
|
+
If you have any questions about the feature, please reach out to us in our Slack
|
|
45
|
+
channel.
|
|
@@ -23,7 +23,7 @@ There are multiple flows to handle payments.
|
|
|
23
23
|
|
|
24
24
|
### Redirecting payment gateway
|
|
25
25
|
|
|
26
|
-
The first step is to call setPaymentMethodOnCart and placeOrder
|
|
26
|
+
The first step is to call `setPaymentMethodOnCart` and `placeOrder`.
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
29
|
const variables = {
|
|
@@ -69,14 +69,16 @@ mutation MyGatewayPaymentOptionsAndPlaceOrder($cartId: String!) {
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
When the query succeeds the GraphCommerce payment module will redirect to the
|
|
72
|
-
payment_url
|
|
73
|
-
One of the following things can happen:
|
|
74
|
-
|
|
75
|
-
- Result 1
|
|
76
|
-
back to the `return_url` with the
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
`payment_url`. The customer handles it's payment on the payment gateway's
|
|
73
|
+
website. One of the following things can happen:
|
|
74
|
+
|
|
75
|
+
- **Result 1:** The customer has successfully paid and the customer is
|
|
76
|
+
redirected back to the `return_url` with the `$TOKEN` injected.
|
|
77
|
+
|
|
78
|
+
- **Result 2:** The customer has failed their payment and the customer is
|
|
79
|
+
redirected back to the `return_url` with the `$TOKEN` injected.
|
|
80
|
+
|
|
81
|
+
- **Result 3:** The customer presses back in their browser and we still get the
|
|
80
82
|
token from the `placeOrder` mutation.
|
|
81
83
|
|
|
82
84
|
GraphCommerce now needs to check if the payment has indeed succeeded by calling
|
|
@@ -95,7 +97,7 @@ mutation MyGatewayProcessPayment($cartId: String!, $token: String!) {
|
|
|
95
97
|
}
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
After that GraphCommerce
|
|
100
|
+
After that GraphCommerce can either:
|
|
99
101
|
|
|
100
102
|
- Redirect to the success page
|
|
101
103
|
- Restore the cart, show the error message and let the customer checkout again.
|
|
@@ -109,18 +111,17 @@ input PaymentMethodInput {
|
|
|
109
111
|
|
|
110
112
|
input MyGatewayPaymentInput {
|
|
111
113
|
"""
|
|
112
|
-
The URL to
|
|
114
|
+
The URL to which the customer should be redirected, after the payment has been processed.
|
|
113
115
|
|
|
114
|
-
This
|
|
115
|
-
$TOKEN will be repaced with the payment gateway token.
|
|
116
|
+
This should be a fully qualified URL: https://mydomain.com/checkout/payment?token=$TOKEN, where $TOKEN will be replaced with the payment gateway token.
|
|
116
117
|
|
|
117
|
-
This information should be stored in the database (
|
|
118
|
+
This information should be stored in the database (encrypted if required)
|
|
118
119
|
"""
|
|
119
120
|
return_url: String!
|
|
120
121
|
"""
|
|
121
122
|
Payment gateway can accept any custom field, for example an issuer or any additional information that can be configured in the checkout.
|
|
122
123
|
|
|
123
|
-
This information should be stored in the database (
|
|
124
|
+
This information should be stored in the database (encrypted if required)
|
|
124
125
|
"""
|
|
125
126
|
custom_field: String
|
|
126
127
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
menu: Known issues
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Known issues
|
|
6
|
+
|
|
7
|
+
An overview of bugs and limitations you may run into with Magento's GraphQL API:
|
|
8
|
+
|
|
9
|
+
## Cart-related mutations result in `Can not find cart with ID` or `Cart isn't active` errors
|
|
10
|
+
|
|
11
|
+
Affected Magento versions:
|
|
12
|
+
|
|
13
|
+
- `2.4.7`: only `2.4.7-beta1`
|
|
14
|
+
- `2.4.6`: all versions
|
|
15
|
+
|
|
16
|
+
This is caused by a regression which results in some GraphQL errors no longer
|
|
17
|
+
getting a category extension string (such as `graphql-no-such-entity`).
|
|
18
|
+
Normally, these errors are handling by automatically creating a new cart, but
|
|
19
|
+
without the proper error category this error-handling logic is nog triggered.
|
|
20
|
+
|
|
21
|
+
As a workaround, you can apply
|
|
22
|
+
[cart-error-category.patch](./patches/cart-error-category.patch).
|
|
23
|
+
|
|
24
|
+
See also
|
|
25
|
+
https://github.com/magento/magento2/commit/49cbe774020d3dfa6ee2b8702376a947801c9971
|
|
26
|
+
|
|
27
|
+
## Next steps
|
|
28
|
+
|
|
29
|
+
- [Overview](./readme)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Fix inactive/non-existent cart handling by re-adding GraphQL error category extension
|
|
2
|
+
|
|
3
|
+
@package magento/framework
|
|
4
|
+
|
|
5
|
+
Index: GraphQl/Exception/GraphQlNoSuchEntityException.php
|
|
6
|
+
IDEA additional info:
|
|
7
|
+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
8
|
+
<+>UTF-8
|
|
9
|
+
===================================================================
|
|
10
|
+
diff --git a/GraphQl/Exception/GraphQlNoSuchEntityException.php b/GraphQl/Exception/GraphQlNoSuchEntityException.php
|
|
11
|
+
--- a/GraphQl/Exception/GraphQlNoSuchEntityException.php
|
|
12
|
+
+++ b/GraphQl/Exception/GraphQlNoSuchEntityException.php (date 1698390008711)
|
|
13
|
+
@@ -7,6 +7,8 @@
|
|
14
|
+
|
|
15
|
+
namespace Magento\Framework\GraphQl\Exception;
|
|
16
|
+
|
|
17
|
+
+use GraphQL\Error\ClientAware;
|
|
18
|
+
+use GraphQL\Error\ProvidesExtensions;
|
|
19
|
+
use Magento\Framework\Exception\NoSuchEntityException;
|
|
20
|
+
use Magento\Framework\Phrase;
|
|
21
|
+
|
|
22
|
+
@@ -15,7 +17,7 @@
|
|
23
|
+
*
|
|
24
|
+
* @api
|
|
25
|
+
*/
|
|
26
|
+
-class GraphQlNoSuchEntityException extends NoSuchEntityException implements \GraphQL\Error\ClientAware
|
|
27
|
+
+class GraphQlNoSuchEntityException extends NoSuchEntityException implements ClientAware, ProvidesExtensions
|
|
28
|
+
{
|
|
29
|
+
const EXCEPTION_CATEGORY = 'graphql-no-such-entity';
|
|
30
|
+
|
|
31
|
+
@@ -53,4 +55,15 @@
|
|
32
|
+
{
|
|
33
|
+
return self::EXCEPTION_CATEGORY;
|
|
34
|
+
}
|
|
35
|
+
+
|
|
36
|
+
+ /**
|
|
37
|
+
+ * Get error category
|
|
38
|
+
+ *
|
|
39
|
+
+ * @return array
|
|
40
|
+
+ */
|
|
41
|
+
+ public function getExtensions(): array
|
|
42
|
+
+ {
|
|
43
|
+
+ $exceptionCategory['category'] = $this->getCategory();
|
|
44
|
+
+ return $exceptionCategory;
|
|
45
|
+
+ }
|
|
46
|
+
}
|
package/magento/readme.md
CHANGED
|
@@ -7,6 +7,12 @@ menu: Overview
|
|
|
7
7
|
To integrate with Magento, most of the functionality should work out-of-the box
|
|
8
8
|
if Magento exposes a working GraphQL API.
|
|
9
9
|
|
|
10
|
+
Some additional configuration may be required, which is documented below.
|
|
11
|
+
|
|
12
|
+
Currently, the GraphQL API also has some bugs and limitations which in some
|
|
13
|
+
cases requires a patch to work around, please see
|
|
14
|
+
[Known issues](./known-issues.md)
|
|
15
|
+
|
|
10
16
|
## Magento configuration
|
|
11
17
|
|
|
12
18
|
### Configure Base Link Url to get emails working
|
|
@@ -64,16 +70,6 @@ Remove the URL suffixes from products and categories. (default is `.html`)
|
|
|
64
70
|
`Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Product URL Suffix`
|
|
65
71
|
`Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Category URL Suffix`
|
|
66
72
|
|
|
67
|
-
### Enable guest checkout login
|
|
68
|
-
|
|
69
|
-
During customer login, GraphCommerce queries Magento to determine whether the
|
|
70
|
-
customer account already exists. To do this the following setting must be set to
|
|
71
|
-
Yes:
|
|
72
|
-
`Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout Login`
|
|
73
|
-
|
|
74
|
-
If this is not set correctly, customers will not be able to log in, since they
|
|
75
|
-
will always be prompted to create a new account.
|
|
76
|
-
|
|
77
73
|
## Optional packages
|
|
78
74
|
|
|
79
75
|
- [Store Pickup / MSI](https://github.com/graphcommerce-org/graphcommerce/tree/main/packages/magento-cart-pickup)
|
|
@@ -92,3 +88,4 @@ will always be prompted to create a new account.
|
|
|
92
88
|
|
|
93
89
|
- [Full feature list](../feature-list.md)
|
|
94
90
|
- [SEO Migration](./seo-migration.md)
|
|
91
|
+
- [Known issues](./known-issues.md)
|
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": "
|
|
5
|
+
"version": "8.0.0-canary.69",
|
|
6
6
|
"sideEffects": true,
|
|
7
|
-
"
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.69"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|
|
@@ -21,9 +21,8 @@ The route for the product has changed from `/product/[url]`,
|
|
|
21
21
|
`/product/configurable/[url]`, etc. to `/p/[url]` by default. This is a
|
|
22
22
|
singlular product page for all product types.
|
|
23
23
|
|
|
24
|
-
You can keep using the old behavior by setting
|
|
25
|
-
|
|
26
|
-
This legacy routing will be removed in a future version.
|
|
24
|
+
~~You can keep using the old behavior by setting `legacyProductRoute` to true.~~
|
|
25
|
+
The legacy routing has been removed in GraphCommerce 8.
|
|
27
26
|
|
|
28
27
|
You can also change the product route from `/p/[url]` to something else by
|
|
29
28
|
configuring [productRoute](../framework/config.md#productroute-string)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Upgrading from GraphCommerce 6 to 7
|
|
2
|
+
|
|
3
|
+
Depending on the amounts of customisations you've made, there are some manual
|
|
4
|
+
steps. Please follow the regular [upgrade steps first](./readme.md).
|
|
5
|
+
|
|
6
|
+
1. [`legacyProductRoute` is removed](#legacyproductroute-is-removed)
|
|
7
|
+
2. [Upgrading your Hygraph schema](#upgrading-your-hygraph-schema)
|
|
8
|
+
|
|
9
|
+
## `legacyProductRoute` is removed
|
|
10
|
+
|
|
11
|
+
🟠 Only required if you've used the legacyProductRoute
|
|
12
|
+
|
|
13
|
+
Remove all `/pages/product/*` routes.
|
|
14
|
+
|
|
15
|
+
## Upgrading your Hygraph schema
|
|
16
|
+
|
|
17
|
+
Upgrade your Hygraph schema with the [Hygraph migration cli](../hygraph/cli.md).
|
|
18
|
+
Select `graphcommerce7to8` as version.
|