예제 #1
0
        private Kooboo.Commerce.Customers.Address GetOrCreateAddress(int customerId, Address address)
        {
            var service = new Kooboo.Commerce.Customers.CustomerService(_context.Instance);

            Kooboo.Commerce.Customers.Address addr = null;

            if (address.Id > 0)
            {
                addr = service.Addresses().ById(address.Id);
            }
            else
            {
                _customerApi.AddAddress(customerId, address);
                addr = service.Addresses().ById(address.Id);
            }

            return(addr);
        }