Skip to content

[Magento 2.4.6-p1] Bundle Products - Child Product Visibility set to "Not visible individually" doesn't get returned in GraphQl Bundle Selections #37774

@MihaiComan90

Description

@MihaiComan90

Preconditions and environment

Magento 2.4.6-p1 Enterprise Edition.
Creating a new bundle with a child selection that has the Visibility attribute set to "Not visible individually" doesn't get returned in the product information under the options node in GraphQl Products Query, see screenshot below:

image

Now for some reason i saw this as core intended behaviour although it seems awfully odd, i should be able to create a product specifically for a bundle that wouldn't be visible individually.

Initial investigations led me to check the catalog_category_product indexer which stores the visibility information in the catalog_category_product_index_store* table, although it strips any VISIBILITY_NOT_VISIBLE products from getting added into that indexer.

Also what would happen if i decide not to assign this child product to a category, i should still be able to see it as the selection product response.

Steps to reproduce

  1. Login to the admin
  2. Create a new Simple Product with random data, Enabled, and set the visibility to VISIBILITY_NOT_VISIBLE.
  3. Create a new Bundle Product and assign the above product as an option.
  4. Run the catalog_category_product indexer and check the catalog_category_product_index_store1 table
  5. Notice that the child product doesn't exist.
  6. Run the products graphql query to get the bundle product along with options:
    options { id qty uid quantity position is_default price price_type can_change_quantity label product { name } }
  7. Notice the label and product being empty.
  8. Go back to the child product created at step 2
  9. Change the visibility to VISIBILITY_IN_CATALOG / VISIBILITY_BOTH and repeat step 4
  10. Notice the product is added to the catalog_category_product_index_store1 table and thus is available as the selection product

Expected result

I should be able to set a child product of a bundle as VISIBILITY_NOT_VISIBLE and/or without category and still see it in the graphql selection response

Actual result

Selection is displayed but with no label or product information, see below,

image

Additional information

No response

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

Labels

Issue: needs updateAdditional information is require, waiting for responseProject: GraphQLReported on 2.4.6-p1Indicates original Magento version for the Issue report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions