Open seansan opened 6 years ago
My memory may not be right but I thought it worked this way already.. Did you reindex after changing the config value?
For problem 1 yes this is partly solved. Only the functionality is coupled -- and I think should be decoupled into 2 settings. (btw the extension Lucky does indeed have a duplicate entry error when indexing as mentioned in the blog post)
For problem 2: this seems to be an actual problem
Suppose a store admin wants to
In short. One would want to be able to visit the 'old url' and see the product data. But it makes no sense to add the options of these products to the layered navigation filters. For example: if a product in size SMALL Is no longer available in a category: then dont show the filter.
Problem 1: removing only out of stock products from the layered filters
It seems the setting 'Display Out of Stock Products" does a little more than only as the descriptions describes "Products will still be shown by direct product URLs." For instance it also controls if children options from out of stock child products are added to the layered navigation filters.
So if a store admin wants to "keep old products reachable via the URL even if completely out of stock" but does want to "remove the options from the layered navigation filters if out of stock" then this is not possible at the same time.
To solve this situation one could:
better describe
what it doesProblem 2: removing out of stock children products from the layered filters
A second problem that occurs is that if you add the parent (configurable) products to a category that the SIZE (or other related product attribute) does not respect the stock status even if you configure the previous setting under problem 1 correctly. The resulting querye checks for the in_stock value for the parent product and hence shows all the SIZE options, even when the sub-size is not in stock anymore (leading to customers clicking XXL: then seeing the same complete list of products, but non of them have a size XXL available)
The problem and a workaround solution are presented here: https://magento.stackexchange.com/questions/97742/hide-out-of-stock-products-in-layered-navigation/154654#154654
For example in the image below the sizes 5XL and 6XL no longer exist and all child products with these sizes are out of stock. A user that uses this filter would to either: well not see the filter option n the first place. Or after a click: see not results.
This comment also describes the problem (comment on this reference http://colin.mollenhour.com/2009/07/14/hiding-out-of-stock-items-in-layered-navigation/) :
References:
In conclusion the issue
A new setting can be created to allow for this. Based on the new setting "Remove options fomr layered navigation when out of stock" the admin can control 'only' the removeal of the options from the layered navigation.
This sounds rather default and it gave me quite a scare when I realized this did not work as expected. The link above does solve the situation but doesnt seem to be the structural solution. This needs to be fixed.