Solved: The Studio Theme Bug Making In-Stock Shopify Products Show as 'Sold Out'

Hey fellow store owners! Ever had that heart-sinking moment when you know you've got products in stock, but your collection pages are screaming 'SOLD OUT!'? It's incredibly frustrating, right? Not only does it confuse customers, making them think they've missed out, but it directly impacts your sales when products are falsely marked as unavailable. We've seen this exact issue pop up recently in the Shopify Community forums, specifically with the popular, free Studio theme (version 15.4.1).

As a Shopify expert and someone who keeps a close eye on community discussions, I wanted to share a quick rundown of what's happening and, more importantly, how you can fix it, thanks to some brilliant folks in the community.

The Root of the Problem: A Missing Parameter

Our friend Tabitha_Kemp kicked off a thread detailing this exact bug. She noticed that the snippets/card-product.liquid file, which dictates how individual product cards appear on your collection pages, seemed to be missing a critical piece of information when rendering product prices and availability. The specific culprit was within the {% render 'price' %} call.

The original code in question looked like this:

{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}

Without the right parameter, the theme was defaulting to showing items as unavailable, even when your inventory was perfectly fine. Talk about a headache for both you and your potential customers!

Before You Edit Code: Essential Inventory Checks

Now, before we jump into editing theme code, it's super important to rule out other common inventory hiccups. As tim_1 wisely pointed out in the thread, sometimes the issue isn't a display bug but how your inventory is configured. You'll want to double-check a few things:

  • Available Inventory: Make sure your product actually has stock counts. Sounds obvious, but sometimes a variant might be set to zero, or a new product might not have inventory assigned yet.
  • Fulfillment Location: Do you have a location set up that can fulfill the item? Shopify needs to know where the stock is coming from. If no location has available stock, it'll show as sold out.
  • Delivery Methods: Are your delivery methods properly configured for the regions you sell to? An item might be in stock, but if there's no way to ship it to a customer's location, it's effectively 'unavailable' to them.
  • Market Setup (for international sellers): If you're selling across different markets, ensure they're properly configured, including pricing and inventory rules for each region. Sometimes market-specific settings can override general inventory.

These preliminary checks can save you a lot of head-scratching before you even touch your theme's code!

The Community's Solution: Adding show_availability: true

Once you've confirmed your inventory backend is solid, the fix for the Studio theme bug itself is surprisingly straightforward. Mustafa_Ali came through with the key insight, and it involves adding a single, crucial parameter to that render 'price' call.

The original render 'price' call in your snippets/card-product.liquid file looks like what we saw earlier:

{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}

What it needs is the show_availability: true parameter. This tells the snippet to actively check and display the product's actual inventory status, rather than defaulting to 'sold out' due to a missing instruction.

Here's what the corrected code should look like:

{% render 'price', product: card_product, price_class: '', show_compare_at_price: true, show_availability: true %}

Step-by-Step Instructions to Implement the Fix

Ready to get this done and banish those false 'Sold Out' messages? Here’s how you can update your Studio theme:

  1. Backup Your Theme: Seriously, this is crucial! Before making any code changes, always duplicate your live theme. Go to your Shopify admin, navigate to Online Store > Themes. Find your Studio theme, click Actions > Duplicate. This way, if anything goes wrong, you can easily revert to the previous version.
  2. Edit Code: Once duplicated, click Actions > Edit code on your active Studio theme.
  3. Locate the File: In the left-hand sidebar, open the Snippets folder. Look for the file named card-product.liquid and click on it.
  4. Find the Line: Inside card-product.liquid, you'll need to find the specific {% render 'price' %} line. It should look very similar to the 'Current code' Tabitha shared at the beginning of this article. Use your browser's search function (Ctrl+F or Cmd+F on Windows/Mac) and type render 'price' to quickly locate it.
  5. Add the Parameter: Carefully add , show_availability: true right before the closing %} of the render 'price' tag. Make sure you include the comma to separate it from the previous parameter!
  6. Your updated line should look exactly like this:
    {% render 'price', product: card_product, price_class: '', show_compare_at_price: true, show_availability: true %}
  7. Save Your Changes: Click the Save button in the top right corner of the code editor.
  8. Test Thoroughly: Head back to your online store, clear your browser cache (this is important to see changes immediately), and check your collection pages. Those in-stock products should now display correctly!

What About show_badges: false?

You might have also seen namphan's suggestion in the thread to add show_badges: false. While this parameter controls the display of various badges (like 'new' or even 'sold out' badges), show_availability: true is specifically designed to ensure the underlying availability logic is correctly checked and displayed. In this particular 'sold out' bug scenario, where the core issue is the theme not properly checking availability, show_availability: true is the more direct and effective fix for ensuring your stock status is accurately reflected.

It's fantastic to see the Shopify community come together to tackle these kinds of issues. A small missing parameter can cause a big headache for store owners, but with a little bit of code tweaking and the right guidance, you can get your store back to showing accurate stock levels and selling effectively. Always remember to back up your theme before making any changes, and don't hesitate to reach out to the community if you get stuck. Happy selling!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases