Incorrect processing of products with non-manageable stock absent in stock index
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 357
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
### Description
In case where a new Product was created with no source/stock assignment (or assignment to a non-default source/stock) and has `Manage Stock = false` in its Advanced Inventory settings it would not show up in the frontend.
Currently, a set of plugins in the `InventoryCatalog` module are responsible for adapting catalog inventory stock status to use indexes provided by MSI. These plugins are joining stock index and products for the frontend product collection. Product, with combination of settings described above, never gets into the stock index and therefore is absent in the product collections
### Possible solutions
* Changing appropriate `INNER JOIN` to `LEFT JOIN` might do the trick
* Other adjustments may be done to the resulting collections to select products in question
Note: None of these possible solutions were verified and may be incorrect.
### Possibly related items
* https://github.com/magento-engcom/msi/issues/2097
* https://github.com/magento-engcom/msi/issues/2106
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the InventoryCatalog plugins that adapt catalog inventory stock status and join MSI stock indexes to frontend product collections. Reproduce a product with no source or a non-default source/stock and Manage Stock set to false, then trace why it is absent from the stock index or collection. Done means the product appears in frontend product collections without regressing stock filtering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100