Skip to content

[GraphQL][Wishlist] Unable to add wishlist items with customizable options to cart #39957

Open
@Syamsg

Description

@Syamsg

Preconditions and environment

  1. Magento version: 2.x.x (specify exact version, e.g. 2.4.8)
  2. PHP version: (e.g. 8.1)
  3. Elasticsearch/OpenSearch version: (if relevant)
  4. Environment: (e.g. local/dev/staging, Docker, WSL, etc.)

Steps to reproduce

  1. Add a product with customizable options to the wishlist using GraphQL mutation addProductsToWishlist.
mutation AddToWishlist {
    addProductsToWishlist(
        wishlistId: "90"
        wishlistItems: [
            {
                sku: "24-UG05"
                quantity: 1
                selected_options: []
                entered_options: [
                    { uid: "Y3VzdG9tLW9wdGlvbi8yNw==", value: "19" }
                    { uid: " Y3VzdG9tLW9wdGlvbi81Mw==", value: "30" }
                ]
            }
        ]
    ) {
        wishlist {
            id
            items_count
            items {
                id
                product {
                    name
                }
            }
        }
    }
}
  1. Attempt to add the wishlist item to the cart using the GraphQL mutation addWishlistItemsToCart.
mutation {
    addWishlistItemsToCart(wishlistId: 90, wishlistItemIds: ["917"]) {
        status
        add_wishlist_items_to_cart_user_errors {
            wishlistItemId
            code
            message
        }
    }
}

Expected result

The wishlist product is properly added to the cart along with the customizable options selected in the wishlist.

Actual result

The mutation does not return an error, but the customizable options are not added properly — only the base product is added to the cart without the selected customizable options.

Additional information

Using GraphQL, I'm unable to add a product with customizable options to the cart from the wishlist — only the base product is added, and the selected options are not included.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FrameworkComponent: WishlistGraphQlIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.8Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions