From 7975d8522e479dd17d2cc801f2dee5759b1ac3fe Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 31 Oct 2025 11:28:42 +0200 Subject: [PATCH] docs: docs for next release (#13907) --- .../fundamentals/admin/translations/page.mdx | 36 +++++++++++++++ .../module-links/index-module/page.mdx | 14 ++++++ www/apps/book/generated/edit-dates.mjs | 4 +- www/apps/book/public/llms-full.txt | 44 ++++++++++++++++++- .../app/orders/fulfillments/page.mdx | 5 ++- .../user-guide/app/products/edit/page.mdx | 21 +++++++++ .../user-guide/app/products/variants/page.mdx | 38 +++++++++++++++- www/apps/user-guide/generated/edit-dates.mjs | 6 +-- 8 files changed, 160 insertions(+), 8 deletions(-) diff --git a/www/apps/book/app/learn/fundamentals/admin/translations/page.mdx b/www/apps/book/app/learn/fundamentals/admin/translations/page.mdx index aba1424d4d..afa4c6f777 100644 --- a/www/apps/book/app/learn/fundamentals/admin/translations/page.mdx +++ b/www/apps/book/app/learn/fundamentals/admin/translations/page.mdx @@ -157,6 +157,42 @@ Next, [change the admin language](!user-guide!/settings/profile#edit-profile-det --- +## Translation Auto-Completion + + + +Translation auto-completion is available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2). + + + +To enhance your development experience, you can set up auto-completion for translation keys. This will allow you to auto-complete translation keys from Medusa's default translations as well as your custom translations. + +To set up auto-completion, create the file `src/admin/i18next.d.ts` with the following content: + +```ts title="src/admin/i18n/i18next.d.ts" +// Import Medusa keys +import type { Resources } from "@medusajs/dashboard" +// Import your custom translation keys +// For example, import the English translation file +import type enTranslation from "./i18n/en.json" +// add other imports for different languages if needed... +// import type esTranslation from "./i18n/es.json" + +declare module "i18next" { + interface CustomTypeOptions { + fallbackNS: "translation" + resources: { + translation: Resources["translation"] + // Optional: add custom namespaces here + // For example, if you have a custom namespace called 'brands': + brands: typeof enTranslation & Resources["translation"] + } + } +} +``` + +--- + ## How Translations are Loaded When you load the translations with the `translation` key in `src/admin/i18n/index.ts`, your custom Medusa Admin translations are merged with the default Medusa Admin translations: diff --git a/www/apps/book/app/learn/fundamentals/module-links/index-module/page.mdx b/www/apps/book/app/learn/fundamentals/module-links/index-module/page.mdx index 2e44a8e6b2..daaaa42c31 100644 --- a/www/apps/book/app/learn/fundamentals/module-links/index-module/page.mdx +++ b/www/apps/book/app/learn/fundamentals/module-links/index-module/page.mdx @@ -273,6 +273,20 @@ This will return all products that are linked to the brand with the name `Acme`. --- +## Trigger Index Reingestion + + + +The Index API routes are available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2). + + + +Medusa provides API routes to view and trigger index reingestion or syncing. This is useful if you want to reingest data manually, for example, after a large data import. + +Refer to the [Index API Reference](!api!/admin#index) for more information about the available API routes and how to use them. + +--- + ## Apply Pagination with the Index Module Similar to Query's `graph` method, the Index Module accepts a `pagination` object to paginate the results. diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 7c04706204..507135ab0e 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -121,7 +121,7 @@ export const generatedEditDates = { "app/learn/fundamentals/workflows/errors/page.mdx": "2025-04-25T14:26:25.000Z", "app/learn/fundamentals/api-routes/override/page.mdx": "2025-05-09T08:01:24.493Z", "app/learn/fundamentals/module-links/index/page.mdx": "2025-05-23T07:57:58.958Z", - "app/learn/fundamentals/module-links/index-module/page.mdx": "2025-10-27T09:30:26.957Z", + "app/learn/fundamentals/module-links/index-module/page.mdx": "2025-10-30T11:31:29.704Z", "app/learn/introduction/build-with-llms-ai/page.mdx": "2025-10-02T15:10:49.394Z", "app/learn/installation/docker/page.mdx": "2025-10-24T08:53:46.445Z", "app/learn/fundamentals/generated-types/page.mdx": "2025-07-25T13:17:35.319Z", @@ -135,5 +135,5 @@ export const generatedEditDates = { "app/learn/fundamentals/workflows/locks/page.mdx": "2025-09-15T09:37:00.808Z", "app/learn/codemods/page.mdx": "2025-09-29T15:40:03.620Z", "app/learn/codemods/replace-imports/page.mdx": "2025-10-09T11:37:44.754Z", - "app/learn/fundamentals/admin/translations/page.mdx": "2025-10-27T09:29:59.965Z" + "app/learn/fundamentals/admin/translations/page.mdx": "2025-10-30T11:55:32.221Z" } \ No newline at end of file diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index 79073475fb..4b2a635f4b 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -7544,6 +7544,38 @@ Next, [change the admin language](https://docs.medusajs.com/user-guide/settings/ *** +## Translation Auto-Completion + +Translation auto-completion is available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2). + +To enhance your development experience, you can set up auto-completion for translation keys. This will allow you to auto-complete translation keys from Medusa's default translations as well as your custom translations. + +To set up auto-completion, create the file `src/admin/i18next.d.ts` with the following content: + +```ts title="src/admin/i18n/i18next.d.ts" +// Import Medusa keys +import type { Resources } from "@medusajs/dashboard" +// Import your custom translation keys +// For example, import the English translation file +import type enTranslation from "./i18n/en.json" +// add other imports for different languages if needed... +// import type esTranslation from "./i18n/es.json" + +declare module "i18next" { + interface CustomTypeOptions { + fallbackNS: "translation" + resources: { + translation: Resources["translation"] + // Optional: add custom namespaces here + // For example, if you have a custom namespace called 'brands': + brands: typeof enTranslation & Resources["translation"] + } + } +} +``` + +*** + ## How Translations are Loaded When you load the translations with the `translation` key in `src/admin/i18n/index.ts`, your custom Medusa Admin translations are merged with the default Medusa Admin translations: @@ -14369,6 +14401,16 @@ This will return all products that are linked to the brand with the name `Acme`. *** +## Trigger Index Reingestion + +The Index API routes are available from [Medusa v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2). + +Medusa provides API routes to view and trigger index reingestion or syncing. This is useful if you want to reingest data manually, for example, after a large data import. + +Refer to the [Index API Reference](https://docs.medusajs.com/api/admin#index) for more information about the available API routes and how to use them. + +*** + ## Apply Pagination with the Index Module Similar to Query's `graph` method, the Index Module accepts a `pagination` object to paginate the results. @@ -62073,7 +62115,7 @@ By following this tutorial, you'll learn how to: ![Diagram showing the relation between product categories and their images](https://res.cloudinary.com/dza7lstvk/image/upload/v1760522310/Medusa%20Resources/category-images-summary_l1duwj.jpg) - [Full Code](https://github.com/medusajs/examples/tree/main/category-images): Find the full code for this tutorial in this repository. -- [OpenApi Specs for Postman](https://res.cloudinary.com/dza7lstvk/raw/upload/v1755010179/OpenApi/Product-Builder_wvhqtq.yaml): Import this OpenApi Specs file into tools like Postman. +- [OpenApi Specs for Postman](https://res.cloudinary.com/dza7lstvk/raw/upload/v1760540368/OpenApi/category-images.openapi_azg6xy.yaml): Import this OpenApi Specs file into tools like Postman. *** diff --git a/www/apps/user-guide/app/orders/fulfillments/page.mdx b/www/apps/user-guide/app/orders/fulfillments/page.mdx index 7b9735a2fa..e5fd700c64 100644 --- a/www/apps/user-guide/app/orders/fulfillments/page.mdx +++ b/www/apps/user-guide/app/orders/fulfillments/page.mdx @@ -141,7 +141,10 @@ To add a shipment for a fulfillment: 2. Scroll down to the Fulfillment's section. If you have more than one fulfillment, find the fulfillment you're looking for. 3. Click on the "Mark as shipped" button at the bottom of the section. 4. In the form that opens: - - To add a tracking number, click on the "Add tracking number" button, then enter a tracking number. + - To add a tracking number, click on the "Add tracking number" button. This will show the following optional fields: + - **Tracking number**: Enter the tracking number provided by the fulfillment provider. + - **Tracking URL**: Enter the URL where the customer can track the shipment. + - **Label URL**: Enter the URL to a label or receipt for the shipment. - If you don’t want the customer to receive a notification that the fulfillment has been shipped, uncheck the “Send notifications” toggle. 5. Once you’re done, click the Save button. diff --git a/www/apps/user-guide/app/products/edit/page.mdx b/www/apps/user-guide/app/products/edit/page.mdx index 896ee327aa..c76e3d6f2a 100644 --- a/www/apps/user-guide/app/products/edit/page.mdx +++ b/www/apps/user-guide/app/products/edit/page.mdx @@ -140,6 +140,27 @@ To delete product images: 2. Press D or click the "Delete" button at the bottom of the page. 3. Confirm deleting the images by clicking the "Delete" button in the pop-up. +### Associate Images with Variants + + + +Product variant media is available from [Medusa Admin v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2). If you don't see the "Manage associated variants" action, request your technical team to [upgrade your Medusa application](!docs!/learn/update). + + + +When an image isn't associated with any variant, it appears for all variants of the product. + +You can associate images with specific variants so that they only appear when that variant is selected. + +You can either manage images of a single variant from [its details page](../variants/page.mdx#manage-product-variant-images), or associate an image with multiple variants from the product's media form. + +To associate images with multiple variants: + +1. In the Media section, hover over the image you want to associate with variants, and click its checkbox. +2. Press M or click the "Manage associated variants" button at the bottom of the page. +3. In the side window that opens, check or uncheck the variants that the image should be associated with. +4. Once you're done, click the Save button. + --- ## Manage Product Options diff --git a/www/apps/user-guide/app/products/variants/page.mdx b/www/apps/user-guide/app/products/variants/page.mdx index 8a527f7477..8acbac7a54 100644 --- a/www/apps/user-guide/app/products/variants/page.mdx +++ b/www/apps/user-guide/app/products/variants/page.mdx @@ -28,7 +28,7 @@ To view the variants of a product: If you click on a variant, you can see its details in a separate page. -![Product Variant Details](https://res.cloudinary.com/dza7lstvk/image/upload/v1739813067/User%20Guide/Screenshot_2025-02-17_at_7.24.04_PM_deaj7w.png) +![Product Variant Details](https://res.cloudinary.com/dza7lstvk/image/upload/v1761822756/User%20Guide/CleanShot_2025-10-30_at_13.12.06_2x_epfvqc.png) --- @@ -123,6 +123,42 @@ To manage the inventory of a product's variants: --- +## Manage Product Variant Media + + + +Product variant media is available from [Medusa Admin v2.11.2](https://github.com/medusajs/medusa/releases/tag/v2.11.2). If you don't see the Media section in the product variant's page, request your technical team to [upgrade your Medusa application](!docs!/learn/update). + + + +A product variant can have images specific to it. These are selected from the product's media. Associating images with variants is useful to show customers the correct images when they select a specific variant on the storefront. + +You can view and manage a variant's images in the Media section of its details page, or you can manage images for multiple variants from the [product's details page](../edit/page.mdx#associate-images-with-variants). + +To manage the images of a product variant: + +1. Go to its product's details page. +2. In the Variants section, click on a variant to go to its details page. +3. In the Media, click on the in the section's header. +4. Choose "Edit images" from the dropdown. +5. In the form that opens: + - To select images for the variant, click on the image in the right section. + - To remove an image from the variant: + - Hover over the image to remove in the left section, and click its checkbox. + - Press R or click the "Remove Selected" button at the bottom of the page. + - To make an image the thumbnail: + - Hover over the image in the left section, and click the icon. + - Press T or click the "Make Thumbnail" button at the bottom of the page. +6. Once you're done, click the "Save" button. + + + +If you want to upload a new image, [add it to the product's media](../edit/page.mdx#manage-product-media) first. + + + +--- + ## Manage Product Variant Metadata Metadata is custom data that can be associated with the product variant in key-value pairs. This is usually used by developers for custom integrations or to store additional information about the variant. diff --git a/www/apps/user-guide/generated/edit-dates.mjs b/www/apps/user-guide/generated/edit-dates.mjs index 367bb09bd1..f40f097e76 100644 --- a/www/apps/user-guide/generated/edit-dates.mjs +++ b/www/apps/user-guide/generated/edit-dates.mjs @@ -25,7 +25,7 @@ export const generatedEditDates = { "app/orders/returns/page.mdx": "2025-10-09T07:33:10.189Z", "app/inventory/page.mdx": "2025-05-30T13:27:31.179Z", "app/orders/claims/page.mdx": "2025-05-30T13:27:39.540Z", - "app/orders/fulfillments/page.mdx": "2025-05-30T13:28:08.998Z", + "app/orders/fulfillments/page.mdx": "2025-10-30T11:49:21.135Z", "app/customers/page.mdx": "2025-05-30T13:27:11.744Z", "app/orders/edit/page.mdx": "2025-05-30T13:27:51.495Z", "app/products/collections/page.mdx": "2025-05-30T13:29:05.948Z", @@ -35,8 +35,8 @@ export const generatedEditDates = { "app/discounts/page.mdx": "2024-05-03T17:36:38+03:00", "app/orders/exchanges/page.mdx": "2025-05-30T13:27:55.646Z", "app/products/create/page.mdx": "2025-05-30T13:29:24.876Z", - "app/products/edit/page.mdx": "2025-05-30T13:29:29.625Z", - "app/products/variants/page.mdx": "2025-05-30T13:29:45.049Z", + "app/products/edit/page.mdx": "2025-10-30T11:24:51.589Z", + "app/products/variants/page.mdx": "2025-10-30T11:26:37.612Z", "app/products/create/bundle/page.mdx": "2025-05-30T13:29:15.958Z", "app/products/create/multi-part/page.mdx": "2025-05-30T13:29:20.321Z", "app/promotions/campaigns/page.mdx": "2025-10-13T10:14:17.948Z",