Checkout UI Extension, can not remove bundle product from cart #2509
Open
Description
I am trying to remove a bundled product in Checkout UI extension using applyCartLinesChange
const changeCartItem = useApplyCartLinesChange();
What I do is
changeCartItem({
type: "removeCartLine",
id: lineItem.id,
quantity: lineItem.quantity,
});
It works fine for ordinary line items. However, when trying to remove bundle line item, it fails to remove it with the following error response:
{
"type": "error",
"message": "Server failed to fulfill the request and to identify the exact issue."
}
The bundled line item has the following body:
{
"id": "gid://shopify/CartLine/ID",
"quantity": 1,
"cost": {
"totalAmount": {
"amount": 2235.46,
"currencyCode": "USD"
}
},
"merchandise": {
"type": "variant",
"id": "gid://shopify/ProductVariant/ID",
"title": "The 3p Fulfilled Snowboard - 15% OFF",
"image": {
"url": "URL",
"altText": ""
},
"selectedOptions": [
{
"name": "Title",
"value": "Default Title"
}
],
"product": {
"id": "gid://shopify/Product/ID",
"vendor": "MY STORE",
"productType": ""
},
"requiresShipping": true
},
"attributes": [],
"discountAllocations": [],
"lineComponents": [
{
"type": "bundle",
"id": "gid://shopify/CartLineComponent/ID",
"merchandise": {
"type": "variant",
"id": "gid://shopify/ProductVariant/ID",
"title": "The 3p Fulfilled Snowboard",
"image": {
"url": "URL",
"altText": ""
},
"selectedOptions": [
{
"name": "Title",
"value": "Default Title"
}
],
"product": {
"id": "gid://shopify/Product/ID",
"vendor": "MY STORE",
"productType": ""
},
"requiresShipping": true
},
"quantity": 1,
"cost": {
"totalAmount": {
"amount": 2235.46,
"currencyCode": "USD"
}
},
"attributes": []
}
]
}
It was created using Expand operation in Cart Transform Extension to assign a discount.
But the issue is that Checkout UI cannot remove bundle products.
Shopify Team, can you please resolve this bug or suggest a solution for the issue.
Thanks
The issue was found in January 2024, still not fixed.