-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
FIX:
A quick non-official hack/fix was posted further below by @loic-paquin and @jas8522 here
Preconditions (*)
- Upgraded from Magento 2.4.3-p1 to 2.4.4
- Default Luma Theme or 3rd Party
- Have backorders turned off (screenshot attached for confirmation that my settings are correct - though they did not change from 2.4.3-p1 where this was not a problem)
Steps to reproduce (*)
- Have a product with 0 salable quantity (configurable product)
- Go to frontend product page and check a variation/configuration (by selecting it)
- You can click "Add to Cart"
Expected result (*)
- It should say "Out of Stock" above SKU and/or you should not be able to select or click the variation swatch.
- Should not be able to click "Add to Cart" for an "Out of Stock" product (with 0 salable qty).
Actual result (*)
- It will allow you to click/select a swatch of an "out of stock" variation
- It will say "In Stock"
- Clicking "Add to Cart" it will reload page with error: "There are no source items with the in stock status"
- The "X in Stock" feature (only X left threshold) shows correctly when it is under my threshold, but does not show on a product that is really out of stock (with selecting the variation). So that function knows not to show because there are 0 in stock.
- Running re-index through CLI, I receive the following error (not sure if it's related - UPDATE: found this to not be related) and made no difference for this problem:
Product EAV index process error during indexation process: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home/********/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php on line 444
My previous installation of 2.4.3-p1 that I just upgraded from, this worked as intended (out of stock variations could not be selected/clicked. It showed a cross-through of the variation that was out of stock). It now does not do this, after upgrading to 2.4.4.
Below are screenshots of the product page as well as the admin/backend showing 0 for default stock quantity. This example is shown on the stock Magento Luma theme.
EDIT/UPDATE:
The original report of EAV indexing (using CLI) failing might be related, was incorrect. It is not related and made no difference for the bug of "Product with Salable Qty of 0 shows 'In Stock' on product page" - they are separate issues.
Additional Information:
#35319 (comment)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- 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
Type
Projects
Status