3

I have a Magento 2.3.5 site with multiple websites and multiple stock sources. Let's say I want to look up "mysku" in the UK store (store code: uk), which belongs to the UK website. Let's say the UK website uses Birmingham stock, but it turns out that while "mysku" is associated with the UK website, it has no allocation in Birmingham stock.

The request has a header of "store" with a value of "uk". The request body looks like this:

{
  products(filter: {sku: {eq: "mysku"}}) {
    items {
        name
        sku
        url_key
    }
  }
}

The response comes back like this:

{
  "data": {
    "products": {
      "items": []
    }
  }
}

I've been unable to find anything in the docs, or anywhere for that matter, that says missing stock allocation equals missing data. It doesn't seem like that should be the expected result, especially considering I can specify a store code relating to a website to which the product doesn't even belong, but if that store is using "default stock" then I get data back. So... not associated to the right website, that's OK I still get results, but not associated to the right stock and I get nothing?

Is this right?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.