What determines inventory policy of a variant?

Hi!

The variant.inventory_policy of an item returns deny even though ‘Track quantity’ is set to false (unticked) on the admin page.

I’d like to display something when a variant is on stock if it’s tracked and also display it if the variant is untracked. I thought the inventory_policy will changed based on this but it seems not.

This page says “You can change the default to allow customers to buy out-of-stock items from the Inventory section of a product.” but it’s not clear whether it’s referring to the ‘Track quantity’ checkbox or how it behaves.

So what exactly determines inventory_policy?

3 Likes

I have the same problem. It’s really confusing. I have product variants with negative inventory quantity + policy = deny and still they’re available for sale.

Hi,

I managed to get around this with the following steps:

  1. Enable Track Quantity for the variant
  2. Set Available value to 1
  3. Save
  4. Disable Track Quantity for the variant
  5. Save again

Hope this helps