diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index 04689a6882..24b1ef0c58 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -35866,11 +35866,11 @@ In this example, the cart must have two product variants with the SKU `SHIRT` fo *** -## Maxiumum Quantity Restriction +## Maximum Quantity Restriction -When the `allocation` property in the `ApplicationMethod` is set to `each`, you can restrict the maximum quantity of each applicable item that the promotion is applied to in the cart. +When the `allocation` property in the `ApplicationMethod` is set to `each`, you can set the `max_quantity` property of `ApplicationMethod` to limit how many item quantities the promotion is applied to. -For example, if the maximum quantity is set to `1` and the customer has a line item with quantity two in the cart, the promotion is only applied to one of them. +For example, if the `max_quantity` property is set to `1` and the customer has a line item with quantity two in the cart, the promotion is only applied to one of them. ```json title="Example Cart" { @@ -71314,7 +71314,7 @@ Refer to the [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workf The workflow you'll create will have the following steps: - [getProductFeedItemsStep](#getProductFeedItemsStep): Retrieve Medusa products as items for the feed. -- [buildProductFieldXmlStep](#buildProductFieldXmlStep): Get the product feed as an XML string. +- [buildProductFeedXmlStep](#buildProductFeedXmlStep): Get the product feed as an XML string. ### getProductFeedItemsStep @@ -71516,13 +71516,13 @@ For each product, you: The `feedItems` array will contain feed data for every product variant. -### buildProductFieldXmlStep +### buildProductFeedXmlStep -In the `buildProductFieldXmlStep`, you will construct the XML string for the product feed. +In the `buildProductFeedXmlStep`, you will construct the XML string for the product feed. -To create the step, create the file `src/workflows/steps/build-product-field-xml.ts` with the following content: +To create the step, create the file `src/workflows/steps/build-product-feed-xml.ts` with the following content: -```ts title="src/workflows/steps/build-product-field-xml.ts" +```ts title="src/workflows/steps/build-product-feed-xml.ts" import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" import { FeedItem } from "./get-product-feed-items" @@ -71530,7 +71530,7 @@ type StepInput = { items: FeedItem[] } -export const buildProductFieldXmlStep = createStep( +export const buildProductFeedXmlStep = createStep( "build-product-feed-xml", async (input: StepInput) => { const escape = (str: string) => @@ -71590,7 +71590,7 @@ Create the file `src/workflows/generate-product-feed.ts` with the following cont ```ts title="src/workflows/generate-product-feed.ts" import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk" import { getProductFeedItemsStep } from "./steps/get-product-feed-items" -import { buildProductFieldXmlStep } from "./steps/build-product-field-xml" +import { buildProductFeedXmlStep } from "./steps/build-product-field-xml" type GenerateProductFeedWorkflowInput = { currency_code: string @@ -71602,7 +71602,7 @@ export const generateProductFeedWorkflow = createWorkflow( (input: GenerateProductFeedWorkflowInput) => { const { items: feedItems } = getProductFeedItemsStep(input) - const xml = buildProductFieldXmlStep({ + const xml = buildProductFeedXmlStep({ items: feedItems, }) @@ -71622,7 +71622,7 @@ The constructor function accepts an object holding the currency code and country In the function, you: - Get the product feed items using the `getProductFeedItemsStep`. -- Build the product feed XML using the `buildProductFieldXmlStep`. +- Build the product feed XML using the `buildProductFeedXmlStep`. A workflow must return an instance of `WorkflowResponse`. It receives as a parameter the data returned by the workflow, which is the XML string. diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/product-feed/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/product-feed/page.mdx index 6d2b2ab3b5..29d02e2e99 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/product-feed/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/product-feed/page.mdx @@ -125,7 +125,7 @@ The workflow you'll create will have the following steps: }, { type: "step", - name: "buildProductFieldXmlStep", + name: "buildProductFeedXmlStep", description: "Get the product feed as an XML string.", depth: 2 } @@ -360,13 +360,13 @@ For each product, you: The `feedItems` array will contain feed data for every product variant. -### buildProductFieldXmlStep +### buildProductFeedXmlStep -In the `buildProductFieldXmlStep`, you will construct the XML string for the product feed. +In the `buildProductFeedXmlStep`, you will construct the XML string for the product feed. -To create the step, create the file `src/workflows/steps/build-product-field-xml.ts` with the following content: +To create the step, create the file `src/workflows/steps/build-product-feed-xml.ts` with the following content: -```ts title="src/workflows/steps/build-product-field-xml.ts" +```ts title="src/workflows/steps/build-product-feed-xml.ts" import { createStep, StepResponse } from "@medusajs/framework/workflows-sdk" import { FeedItem } from "./get-product-feed-items" @@ -374,7 +374,7 @@ type StepInput = { items: FeedItem[] } -export const buildProductFieldXmlStep = createStep( +export const buildProductFeedXmlStep = createStep( "build-product-feed-xml", async (input: StepInput) => { const escape = (str: string) => @@ -434,7 +434,7 @@ Create the file `src/workflows/generate-product-feed.ts` with the following cont ```ts title="src/workflows/generate-product-feed.ts" import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk" import { getProductFeedItemsStep } from "./steps/get-product-feed-items" -import { buildProductFieldXmlStep } from "./steps/build-product-field-xml" +import { buildProductFeedXmlStep } from "./steps/build-product-field-xml" type GenerateProductFeedWorkflowInput = { currency_code: string @@ -446,7 +446,7 @@ export const generateProductFeedWorkflow = createWorkflow( (input: GenerateProductFeedWorkflowInput) => { const { items: feedItems } = getProductFeedItemsStep(input) - const xml = buildProductFieldXmlStep({ + const xml = buildProductFeedXmlStep({ items: feedItems, }) @@ -466,7 +466,7 @@ The constructor function accepts an object holding the currency code and country In the function, you: - Get the product feed items using the `getProductFeedItemsStep`. -- Build the product feed XML using the `buildProductFieldXmlStep`. +- Build the product feed XML using the `buildProductFeedXmlStep`. A workflow must return an instance of `WorkflowResponse`. It receives as a parameter the data returned by the workflow, which is the XML string. diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 8eaaad65f9..996bf892ea 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -6569,7 +6569,7 @@ export const generatedEditDates = { "app/commerce-modules/order/draft-orders/page.mdx": "2025-08-26T09:21:49.780Z", "app/troubleshooting/scheduled-job-not-running/page.mdx": "2025-08-29T11:32:54.117Z", "app/troubleshooting/pnpm/page.mdx": "2025-08-29T12:21:24.692Z", - "app/how-to-tutorials/tutorials/product-feed/page.mdx": "2025-09-01T13:19:59.335Z", + "app/how-to-tutorials/tutorials/product-feed/page.mdx": "2025-10-02T10:24:52.283Z", "app/storefront-development/cart/manage-promotions/page.mdx": "2025-09-11T14:11:40.904Z", "app/recipes/ticket-booking/examples/page.mdx": "2025-09-10T14:11:55.063Z", "app/recipes/ticket-booking/examples/storefront/page.mdx": "2025-09-10T14:14:44.005Z",