docs: add missing step in product builder guide (#13370)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-09-01 18:42:35 +03:00
1 parent b4c0f131b7
commit bafe110352
3 files changed
+34 -9

No files matched your search

+12
View File
@@ -68634,6 +68634,18 @@ After that, you use the [addToCartWorkflow](https://docs.medusajs.com/references
Next, you need to add the complementary and addon product variants to the cart. Replace the `TODO` with the following:
```ts title="src/workflows/add-product-builder-to-cart.ts" highlights={addProductBuilderToCartWorkflowHighlights3}
// Step 4: Get cart after main product is added
const { data: cartWithMainProduct } = useQueryGraphStep({
entity: "cart",
fields: ["*", "items.*"],
filters: {
id: input.cart_id,
},
options: {
throwIfKeyNotFound: true,
},
})
// Step 5: Add complementary and addon products
const {
items_to_add: moreItemsToAdd,