Multi-location Inventory on Product page

I’ve got a Shopify store with two markets, each on its own domain (.co.nz and .com.au). We have a warehouse in each country and track inventory separately. Checkout behavior is fine - if the local warehouse has 0, the order can’t be completed.

The problem is: On the product page, availability shows “in stock” based on total/global inventory. Customers on the AU site don’t see “Sold out” until they enter their address at checkout, which is too late.

For Example:
Warehouse A (.co.nz) = 10 units
Warehouse B (.com.au) = 0 units
The .com.au PDP should say “Sold out,” but it shows “In stock” because it’s pulling global stock, so customers add to cart then find out at checkout once they’ve entered their shipping info that it’s actually OOS - which is obviously frustrating for them.

Has anyone implemented a Liquid (or app) solution that sets PDP availability based on the visitor’s market/domain (i.e., local warehouse inventory), not global stock? I’ve seen apps for retail location stock display, but I’m after a simple in-stock / sold-out state by market.

1 Like

Hi @kiwi12357 :waving_hand:

I understand exactly the problem — showing “In stock” based on global inventory instead of per-market inventory can be frustrating for customers. Shopify by default doesn’t handle market-specific inventory on the PDP, so you’ll need either a Liquid customization or an app solution. Here’s what you can do:


Option 1: Use Shopify Markets + Location-Specific Inventory (Liquid)

  • Shopify stores inventory per location, so you can pull stock from a specific warehouse based on the customer’s market.

  • Steps:

    1. Tag your warehouses in Shopify for each market.

    2. On the product page template (product.liquid or product-template.liquid), add Liquid code to check inventory for the relevant location:

{% assign market_location = 'AU Warehouse' %} {# change based on domain #}

{% assign inventory_item = product.variants.first.inventory_item %}
{% assign location_stock = inventory_item | inventory_level: market_location %}

{% if location_stock > 0 %}
  <span class="in-stock">In stock</span>
{% else %}
  <span class="sold-out">Sold out</span>
{% endif %}

This ensures the PDP reflects local warehouse inventory, not global stock.

  • You can dynamically set market_location based on the domain or market in Liquid.

Option 2: Use an App for Location-Based Inventory

If coding isn’t ideal, some apps handle location-specific stock visibility:

  • Stocky (by Shopify, integrates with POS) – shows inventory by location.

  • Multi-Location Inventory Display – lets you show availability per market/warehouse on PDPs.

  • Advanced Custom Fields + Shopify Functions – more flexible if you want full control.


Option 3: Hybrid Approach

  • Use Liquid to detect visitor domain (request.host) and set the warehouse location variable.

  • Combine with a small app or custom script that reads inventory from that location to display “In stock” / “Sold out.”


:light_bulb: Tip:

  • Make sure to test all combinations (AU customer, NZ customer) to confirm the correct stock shows.

  • Always duplicate your theme before adding Liquid changes.

I completely understand the frustration here — it’s confusing for customers when they see “In stock” on the product page, only to discover it’s sold out at checkout because the local warehouse is empty. That’s definitely not the shopping experience you want, and I’ve seen other multi-market stores run into the same challenge.

The key is that Shopify’s product availability defaults to global inventory unless you customize it. To show stock per market/domain, you’ve got two main approaches:

  1. Liquid customization – In your product template, you can reference the specific inventory_quantity of the location assigned to that market. This requires checking which domain the visitor is on (.co.nz vs .com.au) and then conditionally pulling the inventory for that warehouse. That way, if AU inventory is 0, the PDP shows “Sold out” even if NZ has stock.

  2. Apps / APIs – Some inventory/location apps (like Mechanic or Advanced Inventory Manager) let you surface per-location availability on the PDP. They give you the control to decide which location maps to which market and show “In stock” or “Sold out” accordingly.

  3. Hybrid workaround – If you’re comfortable with Shopify Functions or a developer’s help, you can build a lightweight script that checks the market (request.market) and ties it directly to the right location’s stock. This avoids heavy apps and keeps things lean.

Making this change ensures shoppers see the real stock for their market right away, reducing frustration and abandoned carts. It’s a smart improvement for conversion and customer trust.

As far as I am aware, there is no way to know inventory by location in Liquid directly.
This code quoted above is an AI hallucination – there is no variant.inventory_item in Shopify Liquid:

{% assign inventory_item = product.variants.first.inventory_item %}
{% assign location_stock = inventory_item | inventory_level: market_location %}

However, Flow has access to this data.
Upon each inventory change, Flow can pull this data and update Variant metafield, which you can use to display/sort by location inventory in frontend.

I have a prototype here where “14 Lyndon street” and “Somewhere else” are 2 locations I have in my test store (nothing is done on product page though).

Of course, “replacing” variant.available and variant_inventory with this metafield value would require some code changes…