Skip to content

Configurable Products with Two or More Attributes Aren't Hiding Out of Stock Items #12317

Closed
@lee586

Description

@lee586

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."

Metadata

Metadata

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions