Skip to content

Swatch not updating to show out of stock and are able to click [2.2.1] #12474

Closed
@dawhoo

Description

@dawhoo

Preconditions

  1. Magento 2.2.1 Production
  2. PHP 7.0.23
  3. SQL Server version: 5.6.36-82.0 - Percona Server (GPL), Release 82.0, Revision 58e846a

Steps to reproduce

  1. Configurable Product with 2 sub attributes (Color(Red,Green), Size(S,M,L)
  2. Set Inventory as 1 for each child
  3. Add Red,M product to cart and checkout
  4. Process the order so the item inventory is updated to "0"
  5. Verify item inventory is 0 and make sure backorders are not allowed.

Expected result

  1. The Red,M swatch should have the red slash.
  2. The Red,M swatch should not be able to be selected

Actual result

  1. The Red,M swatch does not have the red slash.
  2. The Red,M swatch is able to be selected.
  3. When you clock "Add to Cart" error displays on product page "You need to choose options for your item."

Magento 2.1.9 updated to 2.2.1 - The problem did not occur in 2.1.9, but it is present in 2.2.1

Products that were out of stock in 2.1.9 had the red slash and your couldn't select that option. After the upgrade, all existing combinations are able to be selected despite being out of stock.

In cataloginventory_stock_status, the items are showing stock_status 0 for items sold in 2.1.9 and 2.2.1
In cataloginventory_stock_status_idx the items are showing stock_status 1 for items sold after upgrading to 2.2.1, and stock status as 0 for items sold in 2.1.9

Metadata

Metadata

Assignees

No one assigned

    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