-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In product list all swatches are always shown even if they are not available when "Display Out of Stock Products" is disabled #4100
In product list all swatches are always shown even if they are not available when "Display Out of Stock Products" is disabled #4100
Conversation
Sorry @fballiano you can delete this #4099 please? |
@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? |
Smart change. 👍 What is this flag for? See https://magento.stackexchange.com/questions/106455/get-product-stock-quantity-in-magento/209510#209510. @addison74 please test for #1694, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ref
magento-lts/app/code/core/Mage/CatalogInventory/Model/Observer.php
Lines 108 to 110 in 5d3af08
if ($productCollection->hasFlag('require_stock_items')) { | |
Mage::getModel('cataloginventory/stock')->addItemsToProducts($productCollection); | |
} else { |
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"
When "Display Out of Stock Products" is enabled shown correctly like this:
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:
The bug occurs when the " Display Out of Stock Products" configuration is disabled.
Related Pull Requests
Fixed Issues (if relevant)
#3527
Manual testing scenarios (*)
Example with sample data:
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.
Questions or comments
Contribution checklist (*)