update
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 35s
Build and Publish / BuildAndDeployArm64 (push) Successful in 3m45s

This commit is contained in:
matst80
2025-11-27 12:45:34 +01:00
parent c2a137d8d4
commit aea168160e
14 changed files with 335 additions and 335 deletions

View File

@@ -26,7 +26,7 @@ func (NoopTracer) Trace(string, map[string]any) {}
// for the purpose of promotion condition evaluation.
type PromotionItem struct {
SKU string
Quantity int
Quantity uint16
Category string
PriceIncVat int64
}
@@ -36,7 +36,7 @@ type PromotionItem struct {
// customer/order metadata.
type PromotionEvalContext struct {
CartTotalIncVat int64
TotalItemQuantity int
TotalItemQuantity uint32
Items []PromotionItem
CustomerSegment string
CustomerLifetimeValue float64
@@ -89,7 +89,7 @@ func NewContextFromCart(g *cart.CartGrain, opts ...ContextOption) *PromotionEval
Category: strings.ToLower(category),
PriceIncVat: it.Price.IncVat,
})
ctx.TotalItemQuantity += it.Quantity
ctx.TotalItemQuantity += uint32(it.Quantity)
}
for _, o := range opts {
o(ctx)