Create addresses of orders

There are two types of order addresses:

  • Billing order address
    Represents the address where the bill or the invoice is sent.
  • Shipping order address
    Represents the address where the purchase is sent or shipped.

The type of the address is specified via the Telerik.Sitefinity.Ecommerce.Orders.Model.AddressType enumeration.

To create an order address, you must perform the following:

  1. Get the orders manager.
    Get an instance of the OrdersManager object.
  2. Get the order.
    Get the order that the address will be associated with. For more information, see For developers: Query orders.
  3. Create a new order address.
    Create an instance of the OrderAddress class by calling the CreateOrderAddres method of the manager.
  4. Set the properties.
    Set the properties of the instance to the specified values.
  5. Associate the address with the order.
    Set the Parent property of the OrderAddress instance to the Order instance. Add the order address to the Addresses collection of the order.
  6. Save the changes.
    Save the changes to the manager.

Use the following code sample:

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?