Price indexer shouldn't be affected by the configuration option cataloginventory/options/show_out_of_stock
- Dominant language
- PHP
- Stars
- 357
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
### Preconditions (*)
1. 2.4.1
2. Multistore installation.
### Steps to reproduce (*)
- Create two websites
- Create a few different sources
- Create 2 stocks for two websites (Stock1 -> Website 1 , Stock 2 -> Website 2 )
- Create a product and assign to both websites
- Add stock quantity only to Stock 1 but not Stock 2 so that the product is salable in Website 1 and out of stock in Website 2
A) Set the configuration option cataloginventory/options/show_out_of_stock to "No" and reindex prices.
- Only the price index for website 1 is created and not for website 2
B) Set the configuration option cataloginventory/options/show_out_of_stock to "Yes" and reindex prices.
- Both price indexes are created
### Expected result (*)
Since the configuration is only referring to inventory and stock I would expect it to not affect price index
### Actual result (*)
Products that are not salable do not have a price index. Thus collections that rely on a price index but ignore stock status will fail to work.
- [X] 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”._
Related issue https://github.com/magento/magento2/issues/32233
Contributor guide
Research direction
Reproduce the multistore setup with separate stocks and compare price reindexing with cataloginventory/options/show_out_of_stock enabled and disabled. Trace the price indexer and the related issue #32233; done when both websites receive price indexes regardless of that inventory display setting, with coverage for salable and out-of-stock products.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100