Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix links in extend product guide #10472

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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/data-models).
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).

</Note>

Expand All @@ -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/module-links).
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).

</Note>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/data-models).
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).

</Note>

Expand All @@ -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/module-links).
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).

</Note>

Expand Down
22 changes: 11 additions & 11 deletions www/apps/resources/app/commerce-modules/product/extend/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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!/basics/modules) to create one.
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.

</Note>

Expand All @@ -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!/data-models).
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).

</Note>

Expand All @@ -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!/module-links).
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).

</Note>

Expand All @@ -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!/basics/modules#4-add-module-to-configurations"
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
}
]}
/>
Expand Down Expand Up @@ -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!/advanced-development/workflows/workflow-hooks).
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).

</Note>

Expand Down Expand Up @@ -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!/advanced-development/api-routes/additional-data).
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).

</Note>

Expand Down Expand Up @@ -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!/advanced-development/workflows/compensation-function).
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).

</Note>

Expand Down Expand Up @@ -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!/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/advanced-development/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!/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/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).

You'll next execute the workflow in the hook handler.

Expand Down Expand Up @@ -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!/advanced-development/module-links/query).
You can also retrieve the `Custom` record linked to a product in your code using [Query](!docs!/learn/advanced-development/module-links/query).

For example:

Expand All @@ -387,7 +387,7 @@ const { data: [product] } = await query.graph({
})
```

Learn more about how to use Query in [this guide](!docs!/advanced-development/module-links/query).
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!/basics/modules) to create one.
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.

</Note>

Expand All @@ -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!/data-models).
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).

</Note>

Expand All @@ -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!/module-links).
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).

</Note>

Expand All @@ -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!/basics/modules#4-add-module-to-configurations"
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
}
]}
/>
Expand Down
Loading