The Track quantity setting is a Shopify configuration to indicates if they should keep track of your stock or not. To hide out of stock items in Shopify, we set filters using the inventory_quantity
attribute.
The inventory_quantity
value is set at the Shopify level, and we just fetch and index the product data that Shopify returns. This means that a product where Shopify is not tracking quantity could be displayed as out of stock on your Algolia Search results.
You can find more information about the 'Out of stock items' configuration in this guide article: [Shopify] How do the Out of stock items configurations work?
As explained on this guide article, neither of these items takes into account whether or not the stock is maintained by Shopify, it only looks at the inventory. If you need to show products that don’t have the stock managed in Shopify for which there’s 0
stock available on the product itself, you can do one of the following:
- Update the setting for 'Out of stock items' to Show all out of stock items. This would only work if all your products are managed outside of Shopify, though. If you have some products for which the stock is still managed within Shopify, and those products are no longer in stock, this setting would make these products show up.
- Update the filter on the front end to a similar logic to the following:
inventory_quantity > 0 OR inventory_management_shopify = 0
. This filter would show everything that has stock available, or where the inventory is not managed by Shopify.
If you need to add a custom filter in Shopify, this guide article can helps: How to add query parameters in Shopify?