magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

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

Open empiricompany opened this issue 1 year ago • 5 comments

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)

https://github.com/OpenMage/magento-lts/issues/3527

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 (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All automated tests passed successfully (all builds are green)
  • [x] Add yourself to contributors list

empiricompany avatar Jul 17 '24 15:07 empiricompany

Sorry @fballiano you can delete this https://github.com/OpenMage/magento-lts/pull/4099 please?

empiricompany avatar Jul 17 '24 15:07 empiricompany

@empiricompany as of today I'm no longer part of this project

fballiano avatar Jul 17 '24 16:07 fballiano

@empiricompany as of today I'm no longer part of this project

What?? This is unacceptable, this project would have died without you! What did I miss?

empiricompany avatar Jul 17 '24 22:07 empiricompany

Smart change. :+1:

What is this flag for? See https://magento.stackexchange.com/questions/106455/get-product-stock-quantity-in-magento/209510#209510.

@ADDISON74 please test for https://github.com/OpenMage/magento-lts/issues/1694, too.

sreichel avatar Jul 23 '24 13:07 sreichel

@sreichel - I will.

Please check this one https://github.com/OpenMage/magento-lts/issues/3527. It could be related too.

addison74 avatar Jul 23 '24 13:07 addison74