docs: fix spelling and grammar (#13862)
Fixed various spelling errors and grammatical issues across multiple .mdx documentation files.
This commit is contained in:
1 parent
dbf8fb9bda
commit
799b57c396
47 files changed
+80
-80
No files matched your search
@@ -191,7 +191,7 @@ A module has a container that holds all resources registered in that module, and
|
||||
|
||||
#### Index Data Method
|
||||
|
||||
The first method you need to add to the servie is a method that receives an array of data to add or update in Algolia's index.
|
||||
The first method you need to add to the service is a method that receives an array of data to add or update in Algolia's index.
|
||||
|
||||
Add the following methods to the `AlgoliaModuleService` class:
|
||||
|
||||
@@ -521,7 +521,7 @@ In the compensation function, you resolve the Algolia Module's service from the
|
||||
|
||||
### Add Sync Products Workflow
|
||||
|
||||
You can now create the worklow that syncs the products to Algolia.
|
||||
You can now create the workflow that syncs the products to Algolia.
|
||||
|
||||
To create the workflow, create the file `src/workflows/sync-products.ts` with the following content:
|
||||
|
||||
|
||||
@@ -1029,7 +1029,7 @@ Finally, add the method to create the product:
|
||||
export const createProductHighlights = [
|
||||
["7", "product", "The product to create in Contentful."],
|
||||
["11", "get", "Try to retrieve the existing product entry in Contentful."],
|
||||
["16", "productEntry", "Return the existng product entry."],
|
||||
["16", "productEntry", "Return the existing product entry."],
|
||||
["20", "createWithId", "Create a new entry in Contentful for the product."],
|
||||
["65", "createProductOption", "Create the product's options in Contentful."],
|
||||
["70", "createProductVariant", "Create the product's variants in Contentful."],
|
||||
@@ -2360,7 +2360,7 @@ Then, you format the retrieved products to:
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
To paginate the retrieved products, implemet a `listAndCount` method as explained in the [Query Context](!docs!/learn/fundamentals/module-links/query-context#using-pagination-with-query) documentation.
|
||||
To paginate the retrieved products, implement a `listAndCount` method as explained in the [Query Context](!docs!/learn/fundamentals/module-links/query-context#using-pagination-with-query) documentation.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -3037,7 +3037,7 @@ In the workflow, you:
|
||||
|
||||
<Note title="Why use When in Workflows?">
|
||||
|
||||
You can't perform data manipulation in a workflow's constructor function. Instead, the Workflows SDK includes utility functions like `when` to perform typical operations that requires accessing data values. Learn more about workflow constraints in the [Workflow Constraints](!docs!/learn/fundamentals/workflows/constructor-constraints) documetation.
|
||||
You can't perform data manipulation in a workflow's constructor function. Instead, the Workflows SDK includes utility functions like `when` to perform typical operations that requires accessing data values. Learn more about workflow constraints in the [Workflow Constraints](!docs!/learn/fundamentals/workflows/constructor-constraints) documentation.
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -828,7 +828,7 @@ export const migrateProductsFromMagentoWorkflow = createWorkflow(
|
||||
You create a workflow using `createWorkflow` from the Workflows SDK. It accepts two parameters:
|
||||
|
||||
1. An object with the workflow's configuration, including the name and whether to store the workflow's executions. You enable storing the workflow execution so that you can view it later in the Medusa Admin dashboard.
|
||||
2. A worflow constructor function, which holds the workflow's implementation. The function receives the input data for the workflow, which is the pagination parameters.
|
||||
2. A workflow constructor function, which holds the workflow's implementation. The function receives the input data for the workflow, which is the pagination parameters.
|
||||
|
||||
In the workflow constructor function, you use the `getMagentoProductsStep` step to retrieve the products from Magento, passing it the pagination parameters from the workflow's input.
|
||||
|
||||
@@ -860,7 +860,7 @@ const { data: shippingProfiles } = useQueryGraphStep({
|
||||
|
||||
You use the `useQueryGraphStep` step to retrieve the store details and shipping profiles. `useQueryGraphStep` is a Medusa step that wraps [Query](!docs!/learn/fundamentals/module-links/query), allowing you to use it in a workflow. Query is a tool that retrieves data across modules.
|
||||
|
||||
Whe retrieving the store details, you specifically retrieve its supported currencies and default sales channel ID. You'll associate the products with the store's default sales channel, and set their variant prices in the supported currencies. You'll also associate the products with a shipping profile.
|
||||
When retrieving the store details, you specifically retrieve its supported currencies and default sales channel ID. You'll associate the products with the store's default sales channel, and set their variant prices in the supported currencies. You'll also associate the products with a shipping profile.
|
||||
|
||||
Next, you'll retrieve products that were previously migrated from Magento to determine which products to create or update. Replace the `TODO` with the following:
|
||||
|
||||
|
||||
@@ -1334,7 +1334,7 @@ A subscriber file exports:
|
||||
- An asynchronous function that's executed whenever the associated event is emitted, which is the `order.placed` event.
|
||||
- A configuration object with an `event` property indicating the event the subscriber is listening to.
|
||||
|
||||
The subscriber function accepts the event's details as a first paramter which has a `data` property that holds the data payload of the event. For example, Medusa emits the `order.placed` event with the order's ID in the data payload. The function also accepts as a second parameter the [Medusa container](!docs!/learn/fundamentals/medusa-container).
|
||||
The subscriber function accepts the event's details as a first parameter which has a `data` property that holds the data payload of the event. For example, Medusa emits the `order.placed` event with the order's ID in the data payload. The function also accepts as a second parameter the [Medusa container](!docs!/learn/fundamentals/medusa-container).
|
||||
|
||||
In the function, you execute the `sendOrderConfirmationWorkflow` by invoking it, passing it the `container`, then using its `run` method. The `run` method accepts an object having an `input` property, which is the input to pass to the workflow. You pass the ID of the placed order as received in the event's data payload.
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ Where:
|
||||
|
||||
- Enter a name for the API token, choose "Editor" for the permissions, then click Save.
|
||||
|
||||

|
||||

|
||||
|
||||
- `SANITY_PROJECT_ID`: The ID of the project, which you can find at the top section of your Sanity project's dashboard.
|
||||
|
||||
@@ -1816,7 +1816,7 @@ export const useSanitySyncs = (
|
||||
|
||||
The `useTriggerSanitySync` hook creates a mutation that, when executed, sends a request to the trigger sync API route you created earlier to sync all products.
|
||||
|
||||
The `useSanitySyncs` hook sends a request to the retrieve sync executions API route that you created earlier to retrieve the workflow's exections.
|
||||
The `useSanitySyncs` hook sends a request to the retrieve sync executions API route that you created earlier to retrieve the workflow's executions.
|
||||
|
||||
Finally, to create the UI route, create the file `src/admin/routes/sanity/page.tsx` with the following content:
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ export class ShipStationClient {
|
||||
if (typeof resp !== "string" && resp.errors?.length) {
|
||||
throw new MedusaError(
|
||||
MedusaError.Types.INVALID_DATA,
|
||||
`An error occured while sending a request to ShipStation: ${
|
||||
`An error occurred while sending a request to ShipStation: ${
|
||||
resp.errors.map((error) => error.message)
|
||||
}`
|
||||
)
|
||||
@@ -630,7 +630,7 @@ export class ShipStationClient {
|
||||
if (resp.rate_response.errors?.length) {
|
||||
throw new MedusaError(
|
||||
MedusaError.Types.INVALID_DATA,
|
||||
`An error occured while retrieving rates from ShipStation: ${
|
||||
`An error occurred while retrieving rates from ShipStation: ${
|
||||
resp.rate_response.errors.map((error) => error.message)
|
||||
}`
|
||||
)
|
||||
@@ -1281,7 +1281,7 @@ Where `SHIPSTATION_API_KEY` is the ShipStation API key, which you can retrieve o
|
||||
|
||||
.
|
||||
|
||||
- On the API Settings page, make sure V2 API is selected for "Select API Verion" field, then click the "Generate API Key" button.
|
||||
- On the API Settings page, make sure V2 API is selected for "Select API Version" field, then click the "Generate API Key" button.
|
||||
|
||||

|
||||
|
||||
|
||||
Reference in new issue
Block a user