docs: revise main docs outline (#10502)
This commit is contained in:
@@ -12,7 +12,7 @@ Before creating an actor type, you must have a module with a data model represen
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn how to create a module in [this guide](!docs!/learn/basics/modules).
|
||||
Learn how to create a module in [this guide](!docs!/learn/fundamentals/modules).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -43,7 +43,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -55,7 +55,7 @@ Next, you'll define a module link between the `Custom` and `Cart` data model. A
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -82,7 +82,7 @@ This defines a link between the `Cart` and `Custom` data models. Using this link
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.ts",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -115,7 +115,7 @@ To do that, you'll consume the [cartCreated](/references/medusa-workflows/create
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -150,7 +150,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -202,7 +202,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -260,9 +260,9 @@ The workflow accepts as an input the created cart and the `additional_data` para
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the cart to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the cart to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next call the workflow in the hook handler.
|
||||
|
||||
@@ -355,7 +355,7 @@ Among the returned `cart` object, you'll find a `custom` property which holds th
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a cart in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a cart in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -369,7 +369,7 @@ const { data: [cart] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -49,7 +49,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -61,7 +61,7 @@ Next, you'll define a module link between the `Custom` and `Customer` data model
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -88,7 +88,7 @@ This defines a link between the `Customer` and `Custom` data models. Using this
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.ts",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -121,7 +121,7 @@ To do that, you'll consume the [customersCreated](/resources/references/medusa-w
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -156,7 +156,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -208,7 +208,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -266,9 +266,9 @@ The workflow accepts as an input the created customer and the `additional_data`
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the customer to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the customer to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next execute the workflow in the hook handler.
|
||||
|
||||
@@ -367,7 +367,7 @@ Among the returned `customer` object, you'll find a `custom` property which hold
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a customer in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a customer in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -381,7 +381,7 @@ const { data: [customer] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ remoteLink.create({
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about the remote link in [this documentation](!docs!/learn/advanced-development/module-links/remote-link).
|
||||
Learn more about the remote link in [this documentation](!docs!/learn/fundamentals/module-links/remote-link).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -49,7 +49,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -61,7 +61,7 @@ Next, you'll define a module link between the `Custom` and `Product` data model.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -88,7 +88,7 @@ This defines a link between the `Product` and `Custom` data models. Using this l
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.js",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -121,7 +121,7 @@ To do that, you'll consume the [productsCreated](/references/medusa-workflows/cr
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -156,7 +156,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -208,7 +208,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -266,9 +266,9 @@ The workflow accepts as an input the created product and the `additional_data` p
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the product to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the product to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next execute the workflow in the hook handler.
|
||||
|
||||
@@ -373,7 +373,7 @@ Among the returned `product` object, you'll find a `custom` property which holds
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a product in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a product in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -387,7 +387,7 @@ const { data: [product] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ In this document, you'll learn how to calculate a product variant's price with t
|
||||
|
||||
You'll need the following resources for the taxes calculation:
|
||||
|
||||
1. [Query](!docs!/learn/advanced-development/module-links/query) to retrieve the product's variants' prices for a context. Learn more about that in [this guide](../price/page.mdx).
|
||||
1. [Query](!docs!/learn/fundamentals/module-links/query) to retrieve the product's variants' prices for a context. Learn more about that in [this guide](../price/page.mdx).
|
||||
2. The Tax Module's main service to get the tax lines for each product.
|
||||
|
||||
```ts
|
||||
|
||||
@@ -8,7 +8,7 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you'll learn how to retrieve product variant prices in the Medusa application using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
In this document, you'll learn how to retrieve product variant prices in the Medusa application using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
<Note title="Why use Query?">
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -49,7 +49,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -61,7 +61,7 @@ Next, you'll define a module link between the `Custom` and `Promotion` data mode
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -88,7 +88,7 @@ This defines a link between the `Promotion` and `Custom` data models. Using this
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.js",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -121,7 +121,7 @@ To do that, you'll consume the [promotionsCreated](/references/medusa-workflows/
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -156,7 +156,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -208,7 +208,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -266,9 +266,9 @@ The workflow accepts as an input the created promotion and the `additional_data`
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the promotion to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the promotion to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next execute the workflow in the hook handler.
|
||||
|
||||
@@ -379,7 +379,7 @@ Among the returned `promotion` object, you'll find a `custom` property which hol
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a promotion in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a promotion in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -393,7 +393,7 @@ const { data: [promotion] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user