@graphcommerce/docs 8.0.0-canary.40 → 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 +60 -10
- package/framework/config.md +14 -0
- package/hygraph/property-picker.md +45 -0
- package/magento/implementing-payment-gateways.md +16 -15
- package/magento/known-issues.md +0 -25
- package/package.json +2 -2
- package/upgrading/graphcommerce-5-to-6.md +2 -3
- package/upgrading/graphcommerce-7-to-8.md +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,58 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 8.0.0-canary.
|
|
3
|
+
## 8.0.0-canary.69
|
|
4
4
|
|
|
5
|
-
## 7.1.0-canary.
|
|
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
|
|
6
56
|
|
|
7
57
|
## 7.1.0-canary.38
|
|
8
58
|
|
|
@@ -899,31 +949,31 @@
|
|
|
899
949
|
All occurences of `<Trans>` and `t` need to be replaced:
|
|
900
950
|
|
|
901
951
|
```tsx
|
|
902
|
-
import { Trans, t } from
|
|
952
|
+
import { Trans, t } from "@lingui/macro";
|
|
903
953
|
|
|
904
954
|
function MyComponent() {
|
|
905
|
-
const foo =
|
|
955
|
+
const foo = "bar";
|
|
906
956
|
return (
|
|
907
957
|
<div aria-label={t`Account ${foo}`}>
|
|
908
958
|
<Trans>My Translation {foo}</Trans>
|
|
909
959
|
</div>
|
|
910
|
-
)
|
|
960
|
+
);
|
|
911
961
|
}
|
|
912
962
|
```
|
|
913
963
|
|
|
914
964
|
Needs to be replaced with:
|
|
915
965
|
|
|
916
966
|
```tsx
|
|
917
|
-
import { Trans } from
|
|
918
|
-
import { i18n } from
|
|
967
|
+
import { Trans } from "@lingui/react";
|
|
968
|
+
import { i18n } from "@lingui/core";
|
|
919
969
|
|
|
920
970
|
function MyComponent() {
|
|
921
|
-
const foo =
|
|
971
|
+
const foo = "bar";
|
|
922
972
|
return (
|
|
923
973
|
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
924
|
-
<Trans key=
|
|
974
|
+
<Trans key="My Translation {foo}" values={{ foo }}></Trans>
|
|
925
975
|
</div>
|
|
926
|
-
)
|
|
976
|
+
);
|
|
927
977
|
}
|
|
928
978
|
```
|
|
929
979
|
|
package/framework/config.md
CHANGED
|
@@ -171,6 +171,16 @@ 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
|
+
#### 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
|
+
|
|
174
184
|
#### googleAnalyticsId: string
|
|
175
185
|
|
|
176
186
|
See https://support.google.com/analytics/answer/9539598?hl=en
|
|
@@ -301,6 +311,10 @@ Debug configuration for GraphCommerce
|
|
|
301
311
|
|
|
302
312
|
Reports which plugins are enabled or disabled.
|
|
303
313
|
|
|
314
|
+
#### sessions: boolean
|
|
315
|
+
|
|
316
|
+
Enable debugging interface to debug sessions
|
|
317
|
+
|
|
304
318
|
#### webpackCircularDependencyPlugin: boolean
|
|
305
319
|
|
|
306
320
|
Cyclic dependencies can cause memory issues and other strange bugs.
|
|
@@ -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
|
}
|
package/magento/known-issues.md
CHANGED
|
@@ -24,31 +24,6 @@ As a workaround, you can apply
|
|
|
24
24
|
See also
|
|
25
25
|
https://github.com/magento/magento2/commit/49cbe774020d3dfa6ee2b8702376a947801c9971
|
|
26
26
|
|
|
27
|
-
## Customer is forced to sign up, even if already registered
|
|
28
|
-
|
|
29
|
-
Affected Magento versions:
|
|
30
|
-
|
|
31
|
-
- `2.4.7` and all future release series
|
|
32
|
-
- `2.4.6`: `2.4.6-p1` and up
|
|
33
|
-
- `2.4.5`: `2.4.5-p3` and up
|
|
34
|
-
- `2.4.4`: `2.4.4-p4` and up
|
|
35
|
-
|
|
36
|
-
During customer login, GraphCommerce queries Magento to determine whether the
|
|
37
|
-
customer account already exists or not. If not, the sign-up form is shown
|
|
38
|
-
instead.
|
|
39
|
-
|
|
40
|
-
In affected Magento versions, the behavior of the `isEmailAvailable` query that
|
|
41
|
-
is used to do this was made dependent on the `Enable Guest Checkout Login`
|
|
42
|
-
configuration setting. If disabled, this query will always return `true`,
|
|
43
|
-
resulting in the sign-up form always being shown, even if the customer already
|
|
44
|
-
exists.
|
|
45
|
-
|
|
46
|
-
To solve this, the following setting must be set to `Yes`:
|
|
47
|
-
`Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Enable Guest Checkout Login`
|
|
48
|
-
|
|
49
|
-
See also
|
|
50
|
-
https://developer.adobe.com/commerce/php/development/backward-incompatible-changes/highlights/#isemailavailable-api
|
|
51
|
-
|
|
52
27
|
## Next steps
|
|
53
28
|
|
|
54
29
|
- [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": "8.0.0-canary.
|
|
5
|
+
"version": "8.0.0-canary.69",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "8.0.0-canary.
|
|
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.
|