Why are my out of stock items still showing on website as available to purchase even though?

Topic summary

A merchant is experiencing an issue where products with zero inventory remain purchasable on their storefront, despite having “Track Inventory” enabled and “Continue selling when out of stock” disabled. This is causing customer disappointment when orders cannot be fulfilled.

Recommended troubleshooting steps:

  • Check all inventory locations: Verify that all fulfillment locations (Settings → Locations) show zero stock, as Shopify will sell from any location with available inventory
  • Confirm variant settings: Double-check each variant has “Track inventory” checked and “Continue selling when out of stock” unchecked
  • Review theme code: Some custom themes bypass Shopify’s built-in inventory checks. Adding a conditional check ({% if current_variant.available %}) around the Add-to-Cart button in the product template can force the button to hide when inventory reaches zero

After implementing these fixes, test in an incognito window to confirm sold-out items are no longer purchasable. The issue remains unresolved pending the merchant’s implementation of these suggestions.

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

I have products that are still displaying and available for purchase on our website even though inventory says ‘0’ - the ‘Track Inventory’ is checked and ‘Continue selling when out of stock’ is NOT checked. I can’t see anything in the Theme that is overriding inventory settings. This is creating pain points as customers are purchasing items we don’t have and are then disappointed when we can’t send them. Any help gratefully received :slightly_smiling_face:

Hello @Shoppington

This usually means one of two things: either some of your variants still show available inventory at a secondary location, or your theme is bypassing Shopify’s “in stock” checks and rendering the Add-to-Cart button unconditionally. Let’s walk through both fixes:

1) Double-check all inventory locations

  • Go to Settings → Locations in your Shopify Admin.
  • For each location, click into it and look for that product’s variant—make sure all locations are truly at “0” inventory.
  • If any remote or fulfillment location still has stock, Shopify will default to selling from there. Adjust or disable inventory at that location.

2) Verify your variant’s inventory policy

  • On the product page in Admin, click a variant.
  • Ensure “Track inventory” is checked and “Continue selling when out of stock” is unchecked.
  • Save. Then run a quick “Buy it now” test in an incognito window to confirm.

3) Patch your theme (if it’s ignoring inventory)
Some custom themes skip Shopify’s variant.available check. To force-hide sold-out variants, add this snippet around your Add-to-Cart code in sections/main-product.liquid (or the equivalent product template):

{% if current_variant.available %}

… {% else %} Sold out {% endif %}

That ensures no “Add to Cart” button ever shows when available is false (i.e. inventory = 0 and not continuing to sell). After you’ve done all three, clear your storefront cache or reload in a private window. Your zero-inventory products and variants should now be fully hidden from purchase.