update
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m4s
Build and Publish / BuildAndDeployArm64 (push) Successful in 6m18s

This commit is contained in:
matst80
2025-12-04 08:51:59 +01:00
parent 7606c1f9df
commit 82b64ee8d4
3 changed files with 83 additions and 81 deletions

View File

@@ -158,8 +158,9 @@ func main() {
} else {
for _, update := range res {
for _, item := range ret.Items {
if matchesSkuAndLocation(update, *item) {
item.Quantity = uint16(update.Quantity)
if matchesSkuAndLocation(update, *item) && update.Quantity != uint32(item.Stock) {
// maybe apply an update to give visibility to the cart
item.Stock = uint16(update.Quantity)
}
}
}