Difference in inventory quantity between Shopify Editor and live version

Topic summary

A developer is experiencing inconsistent inventory quantity values for products bundled with Shopify’s Bundles app. The issue specifically affects custom code displaying inventory status (in stock, back-order, out of stock) on product and collection pages.

The Problem:

  • product.selected_or_first_available_variant.inventory_quantity returns 0 for bundled products on the live site
  • The same code works correctly in Shopify Editor, showing accurate inventory quantities
  • Non-bundled products display correctly in both environments

Evidence:
Console logs (shown in attached screenshots) demonstrate the discrepancy: live site shows 0 inventory while Editor shows correct values for identical bundled products.

Status: Unresolved after one week of troubleshooting. The developer seeks explanation for this environment-specific behavior and potential solutions.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

Hi,

I’m working on custom code to display the inventory status of each product on the product page and on the collection page (in stock, available for back-order, out of stock, etc.). This works, except for products that are bundled with the Shopify Bundles app. It does not display the correct status, because product.selected_or_first_available_variant.inventory_quantity is always 0 on these products for some reason.

When viewing our site through the Shopify Editor (exact same version as the live site), everything works fine and the inventory quantities and status are correct. I really have no idea why this only works when viewing through the Shopify Editor.

When console logging product.selected_or_first_available_variant.inventory_quantity on the live site, we get this for bundled products:

In the shopify editor, we get this for bundled products which is correct:

Could anyone explain to me what causes this and how to fix this? I really have no idea and have been stuck on this issue for a week now.