Example #1
0
 public bool AddToOrderAndSave(Order o, LineItem li)
 {
     o.IsAbandonedEmailSent = false;
     o.TimeOfOrderUtc       = DateTime.UtcNow;
     OrderServices.AddItemToOrder(o, li);
     AnalyticsService.RegisterEvent(CurrentCustomerId, ActionTypes.ProductAddedToCart, li.ProductId);
     return(OrderServices.Orders.Upsert(o));
 }
Example #2
0
 public bool AddToOrderWithCalculateAndSave(Order o, LineItem li)
 {
     o.IsAbandonedEmailSent = false;
     o.TimeOfOrderUtc       = DateTime.UtcNow;
     o.UsedCulture          = CurrentRequestContext.MainContentCulture;
     OrderServices.AddItemToOrder(o, li);
     AnalyticsService.RegisterEvent(CurrentCustomerId, ActionTypes.ProductAddedToCart, li.ProductId);
     CalculateOrder(o);
     return(OrderServices.Orders.Upsert(o));
 }