OpenMage / magento-lts

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
https://www.openmage.org
Open Software License 3.0
866 stars 436 forks source link

In product list all swatches are always shown even if they are not available when "Display Out of Stock Products" is disabled #4099

Closed empiricompany closed 2 months ago

empiricompany commented 2 months ago

Description (*)

In the product list, all swatches are always shown even if they are not available. You can verify this on the PDP because only the available ones are displayed correctly.

Tested with both enabled and disabled stock inventory configuration "Display Out of Stock Products" inventory_settings

When "Display Out of Stock Products" is enabled shown correctly like this: show_out_of_stock

When "Display Out of Stock Products" is disabled all swatches are always shown even if they are not available. With this patch shown correctly like this:

not_out_of_stock

The bug occurs when the " Display Out of Stock Products" configuration is disabled.

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. Create configurable product with options as swatch such as color
  2. Set stock unavailable for one color option

Example with sample data:

  1. In product configurable Name: "Nolita cami" SKU "wbk000c" set all children products with color pink unavailable.

In the product list, all colors are always shown even if they are not available. You can verify this on the PDP because only the available ones are displayed correctly.

pdp pl

Questions or comments

Contribution checklist (*)