-
Notifications
You must be signed in to change notification settings - Fork 154
magento/graphql-ce#438: Adjust adding configurable products to the shopping cart #799
Conversation
fb11b86
to
8481770
Compare
8481770
to
aeb7cc5
Compare
A configurable product with variants configured around 2 attributes: first is visual swatch with 5 options, second is text swatch with 3 options, also has required customizable option. mutation {
addConfigurableProductsToCart(
input: {
cart_id: "pTJWGSAzx9mGs8Q3WT7HgE81O2MCO02e"
cart_items: {
data: {
quantity: 5
sku: "configurable-product-1-white-wholesale@us-mobiles.cn"
}
parent_sku: "configurable-product-1"
customizable_options: {
id: 1
value_string: "blah-blah"
}
}
}
) {
cart {
email
items {
id
quantity
}
}
}
} Response{
"data": {
"addConfigurableProductsToCart": {
"cart": {
"email": "John.Doe@example.com",
"items": [
{
"id": "23",
"quantity": 5
},
{
"id": "25",
"quantity": 5
}
]
}
}
}
} When I try to update the quantity for any of the items I have the following situation: Requestmutation {
updateCartItems(
input: {
cart_id: "pTJWGSAzx9mGs8Q3WT7HgE81O2MCO02e"
cart_items: {
cart_item_id: 23
quantity: 1
}
}
) {
cart {
items {
id
quantity
}
}
}
} Response{
"data": {
"updateCartItems": {
"cart": {
"items": [
{
"id": "23",
"quantity": 1
},
{
"id": "25",
"quantity": 5
}
]
}
}
}
} Requestmutation {
updateCartItems(
input: {
cart_id: "pTJWGSAzx9mGs8Q3WT7HgE81O2MCO02e"
cart_items: {
cart_item_id: 25
quantity: 1
}
}
) {
cart {
items {
id
quantity
}
}
}
} Response{
"data": {
"updateCartItems": {
"cart": {
"items": [
{
"id": "23",
"quantity": 5
},
{
"id": "25",
"quantity": 1
}
]
}
}
}
} Expected resultI can update both items Actual resultI cannot update them |
query viewCart(
$cart_id: String!
) {
cart(
cart_id: $cart_id
) {
applied_coupon {
code
}
email
items {
id
... on ConfigurableCartItem {
configurable_options {
id
value_label
option_label
value_id
}
}
}
prices {
grand_total {
value
currency
}
}
selected_payment_method {
code
purchase_order_number
title
}
shipping_addresses {
postcode
}
billing_address {
postcode
}
}
} |
Hi @lenaorobei, thank you for your contribution! |
#438
Description (*)
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)