-
Notifications
You must be signed in to change notification settings - Fork 26
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
Product inventory out of sync after purchase #61
Comments
@lukeholder thanks for moving this into "evaluating". Relatedly, would there be a possibility for us to trigger a product sync via cli to handle these situations? |
@justenh any chance you have a link to documentation that stipulates this? It's so hard to find reputable information that isn't outdated or not relevant for the API. |
I have gone ahead and added support for updating the product (and variants) when an inventory level is updated. This will be in the next release. Please note this will require making sure your API credential key's "Admin API access scopes" includes: read_product_listings, read_products, read_inventory, write_inventory After upgrading you will also need to revisit the webhooks page in the shopify plugin CP and click 'create' to make sure the To get the fix early, change your "require": {
"craftcms/shopify": "dev-develop#167a6b36da3acbe0cea971665faa1d5dee619e6e as 3.1.1",
"...": "..."
} Then run |
@lukeholder Thanks for the update! What action is performed where "write_inventory" needs to be granted? Is this part of the incoming update? |
@justenh apologies that is a error in the docs/readme. It should just be read only for inventory. I will fix shortly. |
This is now out in 3.2.0! |
I've been using this plugin for a custom storefront and learned today that Shopify does not trigger the "products/update" web-hook when an item is purchased, which means that the data Craft has regarding inventory will be out-of-date the moment someone purchase the product. Is there planned support for adding other web-hooks that could trigger product syncs?
This is the particular field in question.
$this->getDefaultVariant()['inventory_quantity'];
The text was updated successfully, but these errors were encountered: