Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout UI Extension, can not remove bundle product from cart #2509

Open
damir-samatov opened this issue Dec 4, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@damir-samatov
Copy link

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.

@damir-samatov damir-samatov added the bug Something isn't working label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant