docs: revise main docs outline (#10502)
This commit is contained in:
@@ -8,7 +8,7 @@ export const metadata = {
|
||||
|
||||
In this chapter, you'll learn how to define a module link between a brand defined in the [custom Brand Module](../../custom-features/module/page.mdx), and a product defined in the [Product Module](!resources!/commerce-modules/product) that's available in your Medusa application out-of-the-box.
|
||||
|
||||
Modules are [isolated](../../../advanced-development/modules/isolation/page.mdx) from other resources, ensuring that they're integrated into the Medusa application without side effects. However, you may need to associate data models of different modules, or you're trying to extend data models from commerce modules with custom properties. To do that, you define module links.
|
||||
Modules are [isolated](../../../fundamentals/modules/isolation/page.mdx) from other resources, ensuring that they're integrated into the Medusa application without side effects. However, you may need to associate data models of different modules, or you're trying to extend data models from commerce modules with custom properties. To do that, you define module links.
|
||||
|
||||
A module link forms an association between two data models of different modules while maintaining module isolation. You can then manage and query linked records of the data models using Medusa's Modules SDK.
|
||||
|
||||
@@ -16,7 +16,7 @@ In this chapter, you'll define a module link between the `Brand` data model of t
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about module links in [this chapters](../../../advanced-development/module-links/page.mdx).
|
||||
Learn more about module links in [this chapters](../../../fundamentals/module-links/page.mdx).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@ export const metadata = {
|
||||
|
||||
After linking the [custom Brand data model](../../custom-features/module/page.mdx) and Medusa's [Product Module](!resources!/commerce-modules/product) in the [previous chapter](../define-link/page.mdx), you'll extend the create product workflow and API route to allow associating a brand with a product.
|
||||
|
||||
Some API routes, including the [Create Product API route](!api!/admin#products_postproducts), accept an `additional_data` request body parameter. This parameter can hold custom data that's passed to the [hooks](../../../advanced-development/workflows/workflow-hooks/page.mdx) of the workflow executed in the API route, allowing you to consume those hooks and perform actions with the custom data.
|
||||
Some API routes, including the [Create Product API route](!api!/admin#products_postproducts), accept an `additional_data` request body parameter. This parameter can hold custom data that's passed to the [hooks](../../../fundamentals/workflows/workflow-hooks/page.mdx) of the workflow executed in the API route, allowing you to consume those hooks and perform actions with the custom data.
|
||||
|
||||
So, in this chapter, to extend the create product flow and associate a brand with a product, you will:
|
||||
|
||||
@@ -17,7 +17,7 @@ So, in this chapter, to extend the create product flow and associate a brand wit
|
||||
|
||||
<Note>
|
||||
|
||||
To learn more about the `additional_data` property and the API routes that accept additional data, refer to [this chapter](../../../advanced-development/api-routes/additional-data/page.mdx).
|
||||
To learn more about the `additional_data` property and the API routes that accept additional data, refer to [this chapter](../../../fundamentals/api-routes/additional-data/page.mdx).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -42,7 +42,7 @@ A workflow hook is a point in a workflow where you can inject a step to perform
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about the workflow hooks in [this chapter](../../../advanced-development/workflows/workflow-hooks/page.mdx).
|
||||
Learn more about the workflow hooks in [this chapter](../../../fundamentals/workflows/workflow-hooks/page.mdx).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -87,7 +87,7 @@ createProductsWorkflow.hooks.productsCreated(
|
||||
Workflows have a special `hooks` property to access its hooks and consume them. Each hook, such as `productCreated`, accepts a step function as a parameter. The step function accepts the following parameters:
|
||||
|
||||
1. An object having an `additional_data` property, which is the custom data passed in the request body under `additional_data`. The object will also have properties passed from the workflow to the hook, which in this case is the `products` property that holds an array of the created products.
|
||||
2. An object of properties related to the step's context. It has a `container` property whose value is the [Medusa container](../../../basics/medusa-container/page.mdx) to resolve framework and commerce tools.
|
||||
2. An object of properties related to the step's context. It has a `container` property whose value is the [Medusa container](../../../fundamentals/medusa-container/page.mdx) to resolve framework and commerce tools.
|
||||
|
||||
In the step, if a brand ID is passed in `additional_data`, you resolve the Brand Module's service and use its generated `retrieveBrand` method to retrieve the brand by its ID. The `retrieveBrand` method will throw an error if the brand doesn't exist.
|
||||
|
||||
@@ -97,7 +97,7 @@ Next, you want to create a link between the created products and the brand. To d
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about the remote link in [this chapter](../../../advanced-development/module-links/remote-link/page.mdx).
|
||||
Learn more about the remote link in [this chapter](../../../fundamentals/module-links/remote-link/page.mdx).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ In other commerce platforms, you extend core features and models through hacky w
|
||||
|
||||
Medusa's framework and orchestration tools mitigate these issues while supporting all your customization needs:
|
||||
|
||||
- [Module Links](../../advanced-development/module-links/page.mdx): Link data models of different modules without building direct dependencies, ensuring that the Medusa application integrates your modules without side effects.
|
||||
- [Workflow Hooks](../../advanced-development/workflows/workflow-hooks/page.mdx): inject custom functionalities into a workflow at predefined points, called hooks. This allows you to perform custom actions as a part of a core workflow without hacky workarounds.
|
||||
- [Additional Data in API Routes](../../advanced-development/api-routes/additional-data/page.mdx): Configure core API routes to accept request parameters relevant to your customizations. These parameters are passed to the underlying workflow's hooks, where you can manage your custom data as part of an existing flow.
|
||||
- [Module Links](../../fundamentals/module-links/page.mdx): Link data models of different modules without building direct dependencies, ensuring that the Medusa application integrates your modules without side effects.
|
||||
- [Workflow Hooks](../../fundamentals/workflows/workflow-hooks/page.mdx): inject custom functionalities into a workflow at predefined points, called hooks. This allows you to perform custom actions as a part of a core workflow without hacky workarounds.
|
||||
- [Additional Data in API Routes](../../fundamentals/api-routes/additional-data/page.mdx): Configure core API routes to accept request parameters relevant to your customizations. These parameters are passed to the underlying workflow's hooks, where you can manage your custom data as part of an existing flow.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ You can also retrieve linked records using Query. Query allows you to retrieve d
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about Query in [this chapter](../../../advanced-development/module-links/query/page.mdx).
|
||||
Learn more about Query in [this chapter](../../../fundamentals/module-links/query/page.mdx).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user