FindByCustomerEmail() public method

public FindByCustomerEmail ( string customerEmail ) : ShoppingCart
customerEmail string
return ShoppingCart
Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
        }