Add customer info
This article describes how to add customer information to the order carrier in the shopping cart.
To add customer information, add the following code to your CMS template code behind file.
/// <summary>
/// Add customer info to the checkout flow.
/// </summary>
void AddCustomerInfo()
{
AddressCarrier customerAddress = new AddressCarrier();
customerAddress.FirstName = "First name";
customerAddress.LastName = "Last name";
customerAddress.Address1 = "address line 1";
customerAddress.Address2 = "address line 2";
customerAddress.Zip = "12345";
customerAddress.City = "Stockholm";
customerAddress.Country = "SE";
customerAddress.MobilePhone = "0123456789";
customerAddress.Email = "testmail@mail.se";
//add customer information.
Module<ModuleECommerce>.Instance.CheckoutFlow.AddOrEditCustomerInfo(CurrentState.Current.ShoppingCart.OrderCarrier, customerAddress, CurrentState.Current.Token);
}