Magento2: Configurable Products with Two or More Attributes Aren't Hiding Out of Stock Items

Created on 17 Nov 2017  路  13Comments  路  Source: magento/magento2

For configurable products, out-of-stock child items are still showing up when configurable item has two or more configurable attributes. And yes, the "Display Out of Stock Products" is set to "NO" in the inventory configuration. If the configurable product only has one attribute, it hides the out of stock sub items. However, with 2 or more, it will show the out of stock options and if you add the out-of-stock item to your cart, you get the error message, "You need to choose options for your item."


Preconditions


  1. CentOS 7, PHP 7.11, mysql 5.7, Magento CE 2.2.1

Steps to reproduce

  1. Create a configurable product with at least two attributes like "Size" and "Color"
  2. Set one of the child products like "Large Red" to quantity zero and "out of stock."
  3. Clear cache, reindex, etc., and visit that product page. Select "Large" and you'll see that "Red" isn't crossed out. Now try and add "Large Red" to cart. You'll get the error message, "You need to choose options for your item."

Expected result

  1. "Large Red" product that is out of stock should be crossed out not even allowing customer to try and add it to cart.

Actual result

  1. Confiruable attribute isn't crossed out or hidden. Still shows up as normal. When selected and "Add to Cart" is pressed, you'll get the error message, "You need to choose options for your item."

Fixed in 2.2.x Clear Description Confirmed Format is valid Ready for Work Reproduced on 2.2.x Reproduced on 2.3.x

Most helpful comment

@lee586 I am working on this issue and I will try to resolve it ASAP. Please feel free to reach me if you have any further concern related to this issue.

All 13 comments

@lee586, thank you for your report.
We've created internal ticket(s) MAGETWO-84037 to track progress on the issue.

As a workaround, I have to disable or delete each child product when it goes out of stock. That is the only way Magento will "X" out that product configuration.

Any idea how soon a patch will be released to tackle this bug?

Same here on 2.2.1, no 'X' on out of stock products.

MM18IN I would like to work on this issues.

@manojxhtml786 thank you for joining. Please accept team invitation here and self-assign the issue.

MM18IN

@hitarthpattani thank you for joining. Please accept team invitation here and self-assign the issue.

@lee586 I am working on this issue and I will try to resolve it ASAP. Please feel free to reach me if you have any further concern related to this issue.

Thank you for working on this @hitarthpattani. This is a major issue for anyone having configurable products with 2 or more attributes trying to control inventory.

Fixed in 2.2.4-preview branch: #12936

From the latest comment a backport to 2.3 is planned.

Hi @mysil2 for the linking to PR. Closing the issue

I have just upgraded to 2.2.4 hoping to see this fixed (as apparent from above) but it does not seem to be fixed. The configurable options which are out of stock still show as the others without any indication of them being disabled. I have tried reindexing and flushing the cache but it did not help.

@lee586 @hitarthpattani @magento-engcom-team Please advise

Was this page helpful?
0 / 5 - 0 ratings