Prevent collections showing out-of-stock products

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,

Shopify’s default behavior for collections and filtering will display products if any variant is in stock or set to “continue selling when out of stock,” regardless of the selected filter options. This means if a product has other sizes available (even if “continue selling” is enabled), it can still appear in filter results.

To prevent products from showing when a specific size variant is not available or not set to “continue selling,” you will need to adjust your product filtering logic.

Here are some approaches:

  • Filter app:

    • Search & Discovery: Shopify’s free app allows more control over search and filter results. You can configure filters to only show products where the selected variant option is truly available.
    • Smart Search & Product Filter: Offers advanced filtering options, including hiding out-of-stock variants or products based on specific variant availability.
    • Product Filter & Search: Provides robust filtering capabilities that can be configured to exclude products without the selected variant.
  • Custom collection logic (developer required): You would need to modify your theme’s collection page template (collection.liquid or a section file like main-collection.liquid) and potentially your facets.js script to add more granular checks for variant availability based on the selected filters. This would involve iterating through product variants and checking their inventory_quantity and inventory_policy.

Best,
Daniel Smith

Thanks for the clarification. We have indeed worked round this by making some changes to the collection grid - but it seems an odd thing to not have built in already.

G