Prevent collections showing out-of-stock products

Topic summary

A shoe retailer migrated to Shopify with ~1,800 products, each having 1-30 size variants. They use the Shoe Size metaobject for filtering and have enabled ‘continue selling when out of stock’ for made-to-order products.

Core Problem:
When customers filter collections by size (e.g., size 13), products appear in results even when that specific size variant doesn’t exist. Example: A shoe with only sizes 7-11 shows up in size 13 filtered results.

Technical Details:

  • The issue occurs because ‘continue selling when out of stock’ is enabled on existing variants
  • Shopify appears to display these products in filtered collections regardless of whether the filtered variant actually exists
  • The retailer has already implemented a custom facets.js workaround to hide genuinely out-of-stock items

Impact:
Two customer complaints received. The poster believes this is a bug in how Shopify handles availability filtering when ‘continue selling when out of stock’ is enabled.

Status: Seeking solutions to prevent non-existent variants from appearing in filtered collection results.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hi,

tl;dr - how to prevent Shopify from showing people ‘continue selling when out of stock’ products when there is no variant for the selected size?

We’ve just migrated our site to Shopify. We sell posh shoes, we have about 1800 products live at any given time, in a variety of sizes. Each product is one colour, and can have between 1 and 30 variants for various sizes.

We use the Shoe Size metaobject for size. They are grouped by base shoe size for filtering.

Here is our collection the for ‘Loake’ brand, filtered for size 13. I have (via a dodgy facets.js hack because Shopify is really weird about showing people out of stock results) forced these collections to only show products which have the customer’s size available: Loake shoes and boots – Herring Shoes

There are 6 results. The problem is that one of them, the Loake Edward in tan, is not available in a size 13. There is no variant for size 13, and there never has been.

The issue is that this shoe is ticked as ‘continue selling when out of stock’ for all of it’s variants (7 to 11), because it’s a product that we order from the manufacturer, they make it, send it to us, we send it on. We call it ‘ghost’ stock, other people might call it pre-order or JIT or whatever.

Shopify handles this by letting people buy it if ‘continue selling when out of stock’ is ticked, even if there’s no inventory. This seems ideal, people can order it and our existing backoffice systems (integrated via graphQL) handle the

Again, I repeat - it DOES NOT HAVE a size 13.

But because ‘continue selling when out of stock’ is ticked for the sizes it does have, Shopify is just showing it to anyone even if the selected filters should really exclude it.

We’ve had two customers complain about this.

How do I prevent this from happening? It seems like a bug.

Many thanks,

Gareth

For actual feature requests, or possible bug reports, always contact a shopify-support advisor directly through the help docs chat.
These are the peer to peer merchant forums.

continue selling when out of stock == available
Turn it off then is the simplest action.
Shopify does not have a top level setting to override behaviors you’ve enabled on a product/variants.

Make sure even if it doesn’t have the size option value, it’s not assigned some metafield somewhere somehow, or similar tag, or other code that would surface this.
Rule out anything causing tail chasing.

Patching it on the frontend with js is pretty much the goto, you can skip products in liquid too but can get messy with product-grids or pagination getting offset from skipped items.
There’s also using the old tag-filtering system.

The crudest of course is just going lower level in the information architecture to remove the data that results in the unwanted outcome; remove products in the collection.

Filter behavior

It does feel like a bug , meanwhile what “available” is as a product status can’t really be fixed/changed for general usage of over 5 MILLION+ merchants.
Then there’s filters combinations that are not always intuitive, so outcomes may not seem like some perfectly strict boolean operation, cheap example: A|B|C|D vs AB&C|D can just be BD
Or just plain server quirks , sometimes fixed by turning it off and on again; :technologist: like maybe at some point it’s sizes did have a wrongly associated size even temporarily but that’s what’s in the cache.

And the reality is shopify is an ecommerce company not a search company; when it comes to possible bugs or lacking-features in introductory search/filtering systems.
For first class features seek first class tools not kitchen sinks.


Extras

UX

Isn’t this only a real issue if trying to have a quick-add for that specific non-variant on the collection grid.
So if not a quickadd, is this really an issue of filters* when some customers can’t reconcile what’s actually on the PDP. *the fact of a possible bug is not the same as UX

UX: just explicitly list on the product cards which things are being matched according to your custom business logic. Either with text or literally bake into the media.

Data based decision making

Out of how many conversions, loud don’t mean a thing.
It may be overthinking if the number of affected is 2 loud people out of thousands per month/year.
This is the same approach shopify would use to consider this behavior: 1 merchant out of 5 million means you could wait years for this to never change.

:thinking: Though these “two customers” may be in a specific demographic that always have shopping problems :angry: ; since this is the last filter option in the size filter.
READ: the filters may not be the core UX problem of the customer frustration it’s just the easiest one to kick with large feet for the slightest friction. So even figuring out a workaround, confirming a bug/bugfix, or moving to a better featureful search service may be a band-aid on lost opportunity.

Dial in the expectations,
Shopifys free apps are introductory and GLACIAL in improvement.
If you have special circumstances get special tools/apps/services beyond a basic introductory features as you could be waiting a looooong time for any movement.

Thank you for taking the time to note that all down. I think my main takeaway from this is that I should report it as a bug, but since you took the time to give a detailed response, here are my responses to your points.

“Turn it off then is the simplest action” - That’s on the table. If this request does not produce any actionable advice, then the fallback plan is to make all of our pre-order products have ‘placeholder’ stock so filtering will deal with them correctly and use metadata to inform the customer that there will be some lead time on these products. Unfortunately that has second-order effects for advertising feeds etc, which will then show pre-order products as in-stock.

“It does feel like a bug , meanwhile what “available” is as a product status can’t really be fixed/changed for general usage of over 5 MILLION+ merchants.” - It feels like a bug because it is. Continuing to sell a certain size when it’s out of stock and just making a product universally available no matter what the customer has asked to see are two very different things. This is definitely a bug. If you can find me one out of those 5 million merchants who has an honest reason for wanting to show customers products that they cannot buy because they’re not available in their size then I should be greatly astonished.

UX - no, it’s not a quick-add issue only, it’s a confusing our customers issue.

“loud don’t mean a thing” - we pride ourselves on our 5 star reviews and excellent customer service. Customer complaints are very rare. Our customers are spending hundreds of pounds with us. They have a right to expect a good experience. These are also not ‘loud’ individuals, they are repeat customers who regularly buy from us and therefore wanted to inform us of a problem. I might also add that for every customer who does complain, one may be quite sure that there are a hundred more who have experienced the same issue and simply left the site in frustration. I am not now, nor ever, going to start dismissing customer complaints, or ascribe them to reasons other than those which the customer has quite clearly communicated to us.

“special circumstances” - filtering results by size is hardly a special circumstance, it is a basic requirement of an ecommerce platform. Shopify does not market itself as a platform with only “basic introductory features” which must be supported with custom coding and paid apps. I am paying them a significant sum each month. It’s not unreasonable of me to expect filtering to work in a common-sense way.

Again, many thanks for your response.

Hey,

Unfortunately, Shopify’s collection filtering shows products based on product-level availability, not variant-specific availability. You’ll need to modify the theme’s collection template (Online StoreThemesEdit code → collection template file) to add Liquid logic that checks if the selected size filter matches available variants. If no match exists, hide that product by comparing active filter values against each product’s variant options. Here’s Shopify’s guide on theme customization.

Since this requires theme customization, an app like K1 PreOrder (I’m the founder) can simplify pre-order management for ghost stock products (or variants only) with automatic Continue selling when out of stock handling, inventory-based display modes (Always / Out of stock / Below threshold), and scheduling. Here’s the app listing if relevant.

Happy to help with the theme customization if needed.

Best regards,
Yauheni