docs: add missing step in product builder guide (#13370)
This commit is contained in:
1 parent
b4c0f131b7
commit
bafe110352
3 files changed
+34
-9
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user