When creating a view of products or of product variations, setting the stock level filter to allow users to filter by in stock items only does not work as expected. Some out of stock items are returned. This issue appears when using either the Quantity field or the Stock Level field directly.
I've tried a cache rebuild and clearing cache through the ui, as well as updating from the most recent stable to the current dev version. This has been tested in multiple different purpose built views, and always works incorrectly.
Edit to add: I have performed an absolute value adjustment on the offending products to make them absolute 0 in case it was not set correctly; no change. However, I have noticed that some of them no longer appear in the "in stock" results for the "stock level field" filter, but the "quantity" filter still shows them.
Upon manually running cron, the stock field results are still incorrect, but the quantity filter results are now as expected. I ran this backwards and set a stock level to positive and saved. The filter did not bring it up in the results. Cron did not bring up the results. Interestingly, sorting the results (in a table of fields) by the current stock level, sorts it correctly. I guess a workaround is for me to sort positive stock values to the top, but I would prefer to have the ability to remove zero stock level items from results entirely.
Edit 2: Sort functionality does not work when applying it to a product view. For reference, I have 2 variations per product.
Comments
Comment #2
sjvellenga commentedComment #3
sjvellenga commented