diff --git a/pkg/cart/cart-grain.go b/pkg/cart/cart-grain.go index 6a5afdd..c0555ee 100644 --- a/pkg/cart/cart-grain.go +++ b/pkg/cart/cart-grain.go @@ -230,7 +230,11 @@ func (c *CartGrain) GetCurrentState() (*CartGrain, error) { func (c *CartGrain) HandleInventoryChange(change inventory.InventoryChange) { for _, item := range c.Items { - if item.Sku == change.SKU && change.StockLocationID == *item.StoreId { + l := "se" + if item.StoreId != nil { + l = *item.StoreId + } + if item.Sku == change.SKU && change.StockLocationID == l { item.Stock = uint16(change.Value) break }