From 2af4657b0697a61a033847bf1221e509aeb1a684 Mon Sep 17 00:00:00 2001 From: matst80 Date: Sun, 4 May 2025 14:47:11 +0200 Subject: [PATCH] update totals --- cart-grain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cart-grain.go b/cart-grain.go index 082d2a9..a07ebf4 100644 --- a/cart-grain.go +++ b/cart-grain.go @@ -285,7 +285,7 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa existingItem, found := c.FindItemWithSku(msg.Sku) if found { existingItem.Quantity += int(msg.Quantity) - c.TotalPrice += existingItem.Price * int64(msg.Quantity) + c.UpdateTotals() } else { return c.AddItem(msg.Sku, int(msg.Quantity)) // extent AddRequest to include quantity }