remove promotions for now
This commit is contained in:
@@ -82,7 +82,7 @@ func main() {
|
||||
|
||||
inventoryPubSub := actor.NewPubSub[inventory.InventoryChange]()
|
||||
|
||||
promotionService := promotions.NewPromotionService(nil)
|
||||
// promotionService := promotions.NewPromotionService(nil)
|
||||
|
||||
reg := cart.NewCartMultationRegistry()
|
||||
reg.RegisterProcessor(
|
||||
@@ -91,12 +91,14 @@ func main() {
|
||||
defer span.End()
|
||||
g.UpdateTotals()
|
||||
|
||||
promotionCtx := promotions.NewContextFromCart(g, promotions.WithNow(time.Now()), promotions.WithCustomerSegment("vip"))
|
||||
_, actions := promotionService.EvaluateAll(promotionData.State.Promotions, promotionCtx)
|
||||
for _, action := range actions {
|
||||
log.Printf("apply: %+v", action)
|
||||
g.UpdateTotals()
|
||||
}
|
||||
// promotionCtx := promotions.NewContextFromCart(g, promotions.WithNow(time.Now()), promotions.WithCustomerSegment("vip"))
|
||||
// _, actions := promotionService.EvaluateAll(promotionData.State.Promotions, promotionCtx)
|
||||
// for _, action := range actions {
|
||||
|
||||
// log.Printf("apply: %+v", action)
|
||||
|
||||
// g.UpdateTotals()
|
||||
// }
|
||||
return nil
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user