Store/location info in collection products

Topic summary

A developer needs to display inventory data for products across two separate store locations when fetching via collections.

The Problem:

  • Products appear in collections at both locations
  • Collection queries only return single inventory details, not location-specific data
  • Pickup functionality cannot be enabled (delivery-only operation)
  • Frontend needs location-wise inventory to manage display logic

Proposed Solution:

  • Use Shopify’s Storefront API or Admin API to retrieve inventory data
  • Extract the InventoryItem ID from each product variant
  • Query inventory levels per location using these IDs
  • Apply this location-specific information on the frontend

The suggested approach involves a GraphQL query to fetch product variants and their associated inventory item IDs, then querying location-specific inventory separately. The discussion remains open with one proposed technical solution but no confirmation of implementation or alternative approaches.

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

Hi folks,

So i have a use-case, where i have 2 locations in my shopify store, and i want to get the data storewise, but that is not possible currently, as i am using collections to fetch the products. and there are some products which are available on both locations, So i need to fetch the products via collections, but i am not getting location wise inventory details in product, it is only showing only one inventory details, and i need to get both details, so that i can add a condition to manage them store wise on frontend itself.

And i can’t enable pickup location, as this is delivery only shop.

Is there any way to achieve this?

Hi,

Hope this will help

  • Use Shopify’s Storefront API or Admin API
  • Get InventoryItem ID for each product

Admin API example

{
  products(first: 10) {
    edges {
      node {
        id
        title
        variants(first: 1) {
          edges {
            node {
              inventoryItem {
                id
              }
            }
          }
        }
      }
    }
  }
}
  • Ask Shopify: “How many at each location?” and Use this Information at the frontend