You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Fix the topic mergeCarts mutation according to PR magento2#30633 (#8121)
* Fix the topic `mergeCarts` mutation according to PR magento2#30633
* Update merge-carts.md
Co-authored-by: Kevin Harper <keharper@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/guides/v2.4/graphql/mutations/merge-carts.md
+66-6Lines changed: 66 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,18 @@ The `mergeCarts` mutation transfers the contents of a guest cart into the cart o
7
7
8
8
The mutation retains any items that were already in the logged-in customer's cart. If both the guest and customer carts contain the same item, `mergeCarts` adds the quantities. Upon success, the mutation deletes the original guest cart.
9
9
10
-
Use the [`customerCart` query]({{page.baseurl}}/graphql/queries/customer-cart.html) to determine the value of the `destination_cart_id` attribute.
`destination_cart_id` | String! | The ID of the logged-in customer's cart
130
+
`destination_cart_id` | String | The ID of the logged-in customer's cart. If you do not specify a value, the mutation determines the customer's cart ID and uses that value.
71
131
`source_cart_id` | String! | The ID of the guest cart
72
132
73
133
## Output attributes
@@ -89,7 +149,7 @@ Attribute | Data Type | Description
89
149
Error | Description
90
150
--- | ---
91
151
`Current user does not have an active cart.` | The `mergeCarts` mutation deactivates the guest cart specified in the `source_cart_id` after merging. The guest cannot make any further operations with it.
92
-
`Required parameter "destination_cart_id" is missing` | The `destination_cart_id` attribute contains an empty value.
93
152
`Required parameter "source_cart_id" is missing` | The `source_cart_id` attribute contains an empty value.
94
153
`The current customer isn't authorized.` | The current customer is not currently logged in, or the customer's token does not exist in the `oauth_token` table, or you tried to merge two guest carts.
95
154
`The current user cannot perform operations on cart` | The authorized customer tried to merge a guest cart into the cart of another customer.
155
+
`Could not create empty cart for customer` | The system could not create an empty cart for the logged-in customer
0 commit comments