docs: fix spelling and grammar (#13862)

Fixed various spelling errors and grammatical issues across multiple .mdx documentation files.
This commit is contained in:
MBLVD
2025-10-27 10:48:59 +02:00
committed by GitHub
parent dbf8fb9bda
commit 799b57c396
47 changed files with 80 additions and 80 deletions
@@ -58,7 +58,7 @@ The [Update Cart API route](!api!/store#carts_postcartsid) accepts a `region_id`
You might need to change the cart's customer in two cases:
- You created the cart for the customer as a guest, then they logged-in, so you want to associate the cart with them as a registered customer.
- You're transfering the cart from one customer to another, which is useful in company setups, such as when implementing B2B commerce applicatons.
- You're transferring the cart from one customer to another, which is useful in company setups, such as when implementing B2B commerce applications.
To set or change the cart's customer, send an authenticated `POST` request to the Set Cart's Customer API route:
@@ -36,7 +36,7 @@ Learn how to install and configure the JS SDK in the [JS SDK documentation](../.
sdk.store.cart.complete(cart.id)
.then((data) => {
if (data.type === "cart" && data.cart) {
// an error occured
// an error occurred
console.error(data.error)
} else if (data.type === "order" && data.order) {
// TODO redirect to order success page
@@ -106,7 +106,7 @@ export default function SystemDefaultPayment() {
sdk.store.cart.complete(cart.id)
.then((data) => {
if (data.type === "cart" && data.cart) {
// an error occured
// an error occurred
console.error(data.error)
} else if (data.type === "order" && data.order) {
// TODO redirect to order success page
@@ -59,7 +59,7 @@ export const highlights = [
["57", "activePaymentSession", "The active session is the first in the payment collection's sessions."],
["62", "", "Test which payment provider is chosen based on the prefix of the provider ID."],
["63", `"pp_stripe_"`, "Check if the chosen provider is Stripe."],
["71", `"pp_system_default"`, "Check if the chosen provider is the default systen provider."],
["71", `"pp_system_default"`, "Check if the chosen provider is the default system provider."],
["77", "default", "Handle unrecognized providers."],
["112", "getPaymentUi", "If a provider is chosen, render its UI."]
]
@@ -195,7 +195,7 @@ export const fetchHighlights = [
["32", "activePaymentSession", "The active session is the first in the payment collection's sessions."],
["38", "", "Test which payment provider is chosen based on the prefix of the provider ID."],
["39", `"pp_stripe_"`, "Check if the chosen provider is Stripe."],
["43", `"pp_system_default"`, "Check if the chosen provider is the default systen provider."],
["43", `"pp_system_default"`, "Check if the chosen provider is the default system provider."],
["45", "default", "Handle unrecognized providers."],
["52", "handlePayment", "The function that handles the payment process using the above functions."]
]
@@ -185,7 +185,7 @@ const StripeForm = ({
sdk.store.cart.complete(cart.id)
.then((data) => {
if (data.type === "cart" && data.cart) {
// an error occured
// an error occurred
console.error(data.error)
} else if (data.type === "order" && data.order) {
// TODO redirect to order success page
@@ -137,7 +137,7 @@ export const highlights = [
password,
})
} catch (error) {
alert(`An error occured while logging in: ${error}`)
alert(`An error occurred while logging in: ${error}`)
return
}
@@ -200,7 +200,7 @@ export const fetchHighlights = [
password,
})
} catch (error) {
alert(`An error occured while logging in: ${error}`)
alert(`An error occurred while logging in: ${error}`)
return
}
@@ -47,7 +47,7 @@ Learn how to install and configure the JS SDK in the [JS SDK documentation](../.
## How to Implement the Register Customer Flow
An example implemetation of the registration flow in a storefront:
An example implementation of the registration flow in a storefront:
<CodeTabs group="store-request">
<CodeTab label="React" value="react">
@@ -95,7 +95,7 @@ export const highlights = [
const fetchError = error as FetchError
if (fetchError.statusText !== "Unauthorized" || fetchError.message !== "Identity with email already exists") {
alert(`An error occured while creating account: ${fetchError}`)
alert(`An error occurred while creating account: ${fetchError}`)
return
}
// another identity (for example, admin user)
@@ -105,7 +105,7 @@ export const highlights = [
email,
password,
}).catch((e) => {
alert(`An error occured while creating account: ${e}`)
alert(`An error occurred while creating account: ${e}`)
}))
if (!loginResponse) {
@@ -206,7 +206,7 @@ export const fetchHighlights = [
const fetchError = error as FetchError
if (fetchError.statusText !== "Unauthorized" || fetchError.message !== "Identity with email already exists") {
alert(`An error occured while creating account: ${fetchError}`)
alert(`An error occurred while creating account: ${fetchError}`)
return
}
// another identity (for example, admin user)
@@ -216,7 +216,7 @@ export const fetchHighlights = [
email,
password,
}).catch((e) => {
alert(`An error occured while creating account: ${e}`)
alert(`An error occurred while creating account: ${e}`)
}))
if (!loginResponse) {
@@ -1440,7 +1440,7 @@ const handleAddToCart = () => {
You add a `handleAddToCart` function that first checks that a variant is selected, that it's in stock, and that the customer has set a quantity greater than `0`.
If the conditions are satisifed, you set `loading` to `true`, then call the `addToCart` function from the cart context, passing the selected variant's ID and the quantity as arguments.
If the conditions are satisfied, you set `loading` to `true`, then call the `addToCart` function from the cart context, passing the selected variant's ID and the quantity as arguments.
After the product is added to the cart, you navigate to the address step, which you'll create later.