Hide out of stock items from the catalog – the case where it doesn’t work
-
Hi there,
I read this topic – Major bug in product inventory status and there is one thing I would like to clarify.?
Shameem (woo-hc) (@shameemreza) wrote:
If a parent product is marked as in stock, but all its variations are out of stock, it should still appear in the catalogue.
The exact conditions to recreate this case:
- Enabled WooCommerce option “Hide out of stock items from the catalog“
- Enabled WooCommerce option “Enable stock management“
- A variable product has enabled “Track stock quantity for this product” with a positive value or any value if “Allow backorders?” is enabled.?
- All variations have enabled “Manage stock?” and set a stock to zero or negative value.
I can confirm that such a product will be displayed in the catalog. What is the practical justification for showing such a product in the catalog? I’m writing it from the perspective of a developer that develops a filtering plugin.?
Arguments against displaying such products in the catalog:
- There is no physical representation of the product to buy because the parent product is only an abstraction, a container for variations.
- The stock status of a parent product shouldn’t affect variations if every variation manages stock independently. WooCommerce even displays a warning “Settings below apply to all variations without manual stock management enabled”. But it’s not true.
- On the single product page is the message “This product is currently out of stock and unavailable.”
- WooCommerce has a product attributes lookup table. Every variation has “In stock” set to false in this table.
As a matter of common sense, such a product should be removed from the catalog. If all variations manage stock independently and are out of stock, the whole product should be all of stock. I would like to understand better why such a product is displayed in the catalog. Maybe there is something I missed.
In the FiboFilters plugin, we’re developing, we decided not to display such products in the catalog while WooCommerce displays them.?I would like to determine which path is more reasonable.
Best
Damian Góra
https://fibofilters.com
- The topic ‘Hide out of stock items from the catalog – the case where it doesn’t work’ is closed to new replies.