Skip to content

[GraphQL] Adding a bundle product with multiple selection options via addProductsToCart doesn't work as expected #33123

Closed
@laurentiumagureanu

Description

@laurentiumagureanu

Preconditions (*)

  1. Magento version 2.4.2
  2. Configure a bundle product to have multiple selection options

Steps to reproduce (*)

  1. use the addProductsToCart mutation
  2. Try to add the bundle product to cart with at least 2 selections for checkbox or multiple selection options
  3. Check the cart and see if the multi-selection option has all the sent selections
  4. I use this mutation:
{
    "operationName": "addProductToCart",
    "variables": {
        "cartId": "B6S7atkjsvbtcG4xmOt4QqbMAq1LBZwR",
        "cartItems": [
            {
                "sku": "24-WG080",
                "quantity": 1,
                "selected_options": [
                    "YnVuZGxlLzEvMS8x",
                    "YnVuZGxlLzIvNC8x",
                    "YnVuZGxlLzMvNS8x",
                    "YnVuZGxlLzMvNy8x",
                    "YnVuZGxlLzQvOC8x"
                ]
            }
        ]
    },
    "query": "mutation addProductToCart($cartId:String!$cartItems:[CartItemInput!]!){addProductsToCart(cartId:$cartId cartItems:$cartItems){cart{id __typename}__typename}}"
}
  1. the 3rd and 4th entry from selected_options refer to the same bundle_option_id but use different bundle_option_selection_id because it is multiple selection: bundle/3/5/1 and bundle/3/7/1

Expected result (*)

  1. All the selections from a multi-selection field should be present in the cart

Actual result (*)

  1. only the last selection is added to cart with the bundle

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • 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

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions