public int GetCartIdByCustomer(string email) { var service = new Core.ShoppingCartService(_context.Instance); var cart = service.FindByCustomerEmail(email); if (cart == null) { var customer = new Kooboo.Commerce.Customers.CustomerService(_context.Instance).FindByEmail(email); cart = Kooboo.Commerce.Carts.ShoppingCart.Create(customer); service.Create(cart); } return(cart.Id); }
public int GetCartIdByCustomer(string email) { var service = new Core.ShoppingCartService(_context.Instance); var cart = service.FindByCustomerEmail(email); if (cart == null) { var customer = new Kooboo.Commerce.Customers.CustomerService(_context.Instance).FindByEmail(email); cart = Kooboo.Commerce.Carts.ShoppingCart.Create(customer); service.Create(cart); } return cart.Id; }