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

BatchUpdate on Variants doesn't update #744

Open
tiziana-git opened this issue Jun 8, 2023 · 1 comment
Open

BatchUpdate on Variants doesn't update #744

tiziana-git opened this issue Jun 8, 2023 · 1 comment

Comments

@tiziana-git
Copy link

I'm trying to update variants of a product with batch update, but it doesn't update anything.
This is my code:
Dim oVarProd As List(Of Variation) = Await wc.Product.Variations.GetAll(CULng(oProdMod(0).id), ParCall)
For iCont As Integer = 0 To oVarProd.Count - 1
oVarProd(iCont).stock_quantity = 1
oVarProd(iCont).price = 10
Next
Dim batchObj As BatchObject(Of Variation) = New BatchObject(Of Variation) With {.update = oVarProd}
Dim RES = Await wc.Product.Variations.UpdateRange(CULng(oProdMod(0).id), batchObj)

Variations inside batchObj has the correct modifyed values

@tiziana-git
Copy link
Author

Using the REST API LOG plugin, i can see the message is:
{
"id": 485,
"error": {
"code": "product_invalid_sku",
"message": "COD non valido o duplicato.",
"data": {
"status": 400,
"resource_id": 467
}
}
},

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

1 participant