Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access location of items from the Shopify API #11

Open
eriksachse opened this issue Jan 10, 2022 · 1 comment
Open

Access location of items from the Shopify API #11

eriksachse opened this issue Jan 10, 2022 · 1 comment

Comments

@eriksachse
Copy link

Plugin works great! But I wonder how I can access the inventoryLevel and plug the location of the product.
The first thing that came to my mind is to expand the possible products inside shopify.products.php with a location string, but that didn't work.
Screenshot 2022-01-10 at 14 35 40
My next idea was to check product.structured-data.php to see if I can create my own hook, but I don't even know how to access the inventoryLevel, or even which function with which string. Has anyone more intel to this?

@tristantbg
Copy link
Owner

Hi Erik,

Getting this kind of of location information seems much more complicated and requires many requests :
https://shopify.dev/api/admin-rest/2022-01/resources/inventorylevel#top

Again, and related to other issues, using GraphQL would help for this :
https://community.shopify.com/c/shopify-apis-and-sdks/getting-all-inventorylevels-for-location-with-graphql/m-p/639851

I still couldn't find time to rework the plugin using GraphQL instead and maybe with the new official php lib :
https://github.com/Shopify/shopify-php-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants