Skip to content

If bundle item is OUT_OF_STOCK then it should not show at all #26109

Open
@TomashKhamlai

Description

@TomashKhamlai

Preconditions (*)

  1. Import Uploading export_catalog_product.tar.gz…

Steps to reproduce (*)

  1. Filter products
{
  products(
    filter: {
      category_id: {
        eq: "2"
      }
    }
  ) {
    items {
      sku
      stock_status
      ... on BundleProduct {
        ship_bundle_items
        weight
        dynamic_weight
        dynamic_sku
        dynamic_price
        items {
          option_id
          type
          title
          sku
          required
          options {
            can_change_quantity
            quantity
            product {
              sku
              stock_status
            }
            price_type
            price
            position
            label
            is_default
            id
          }
        }
      }
      ... on CustomizableProductInterface {
        options {
          option_id
          required
          sort_order
          title
          __typename
        }
      }
    }
  }
}

Expected result (*)

  1. 2 items in multiselect
    image (1)

Actual result (*)

  1. 2 items + 1 empty item for any Product that is out of stock
{
  "data": {
    "products": {
      "items": [
        {
          "sku": "b1-separately (bundle)",
          "stock_status": "IN_STOCK",
          "ship_bundle_items": "SEPARATELY",
          "weight": null,
          "dynamic_weight": false,
          "dynamic_sku": false,
          "dynamic_price": false,
          "items": [
            {
              "option_id": 1,
              "type": "multi",
              "title": "bund-opt-1-only",
              "sku": "b1-separately (bundle)",
              "required": true,
              "options": [
                {
                  "can_change_quantity": false,
                  "quantity": 1,
                  "product": null,
                  "price_type": "FIXED",
                  "price": 0,
                  "position": 1,
                  "label": null,
                  "is_default": true,
                  "id": 1
                },
                {
                  "can_change_quantity": false,
                  "quantity": 1,
                  "product": {
                    "sku": "bundle-simple-1-in",
                    "stock_status": "IN_STOCK"
                  },
                  "price_type": "FIXED",
                  "price": 0,
                  "position": 2,
                  "label": "bundle-simple-1-in",
                  "is_default": false,
                  "id": 2
                },
                {
                  "can_change_quantity": false,
                  "quantity": 2,
                  "product": {
                    "sku": "virtual-prod",
                    "stock_status": "IN_STOCK"
                  },
                  "price_type": "FIXED",
                  "price": 0,
                  "position": 3,
                  "label": "virtual-prod",
                  "is_default": false,
                  "id": 3
                }
              ]
            }
          ],
          "options": null
        },
        {
          "sku": "bundle-simple-1-in",
          "stock_status": "IN_STOCK",
          "options": null
        },
        {
          "sku": "virtual-prod",
          "stock_status": "IN_STOCK",
          "options": null
        }
      ]
    }
  }
}

Metadata

Metadata

Assignees

Labels

Component: BundleIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressProject: GraphQLReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions