Skip to content

Child Product stock is assigned in other stock source and product page show out of stock item #3449

@ananth-iyer

Description

@ananth-iyer

Preconditions (*)

  1. Magento - 2.4.8-p3
  2. magento/inventory-metapackage - 1.2.8-p3
  3. PHP 8.3

Steps to reproduce (*)

  1. First create 4 websites then create MSI source and create stock
  2. Create a new configurable product in non-default website scope
  3. In child products, assign stock to non-default source. Do not use default source.
  4. Open product in new website. it will show options out of stock status
  5. The default stock id should not be used in all products.
  6. Issue found in vendor/magento/module-inventory-catalog/Plugin/InventoryIndexer/Model/ResourceModel/GetBulkLegacyStockStatusDataFromStockRegistry.php
  7. On line, if ($this->defaultStockProvider->getId() === $stockId) { - if it not default stock id then skips and $results is empty so $originalResults data is not considered.
  8. It returns empty & wrong data

Expected result (*)

  1. $results is empty then it should consider $originalResults

Actual result (*)

  1. Child items show FALSE POSITIVE - out of stock status. Although there are in stock.

Thank you.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions