---
title: Shipping methods
slug: commerce-connect-14/docs/shipping-methods
docTags: 
createdAt: 2026-07-23T10:25:34.370Z
---

A shipping method is mapped to a Shipping Provider, visible to a back-end administrator in Optimizely Commerce Connect. So, the public site can display friendly names (such as **Ground Shipping**), which are mapped to a provider, such as UPS. If a customer picks Ground Shipping, UPS is used.

See [Shipping gateways and providers](docId\:qQI1vRZK4e2SKgHM1fAVV) for information about creating gateways and providers.

Classes in this topic are available in the `Mediachase.Commerce.Orders.Dto` namespace.

## Add  shipping method

Go to Commerce **Administration** > **Shippping Tab** > **Shipping Method** to see all the existing shipping methods available per selected langauge.

Click **Create** to add a new shipping method and fill out details like name, friendly name, description, provider, language, base price, currency, active, and default.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/OjSMxhBeCYfumz9ocjRBQ_99014bf-imagexyy2.png)

## Access shipping information

The following example shows how to display shipping methods to users and the respective rates for each, based on the current cart.

```csharp
//Get the list of all shipping methods to be filtered 
    ShippingMethodDto methods = ShippingManager.GetShippingMethods(SiteContext.Current.LanguageName);  
    
    // filter the list for only methods that apply to this particular cart's shipping address 
    List<ShippingMethodDto.ShippingMethodRow> shippingRows = new List<ShippingMethodDto.ShippingMethodRow>(); 
    
    foreach (ShippingMethodDto.ShippingMethodRow method in methods.ShippingMethod.Rows) 
      {
        shippingRows.Add(method); 
      }
    
    List<ShippingRate> list = new List<ShippingRate>(); 
    
    foreach (ShippingMethodDto.ShippingMethodRow row in shippingRows) 
      { 
        Type type = Type.GetType(row.ShippingOptionRow.ClassName); 
        string message = String.Empty; 
        IShippingGateway provider = (IShippingGateway)Activator.CreateInstance(type); 
    
        List<LineItem> items = new List<LineItem>(); 
    
        foreach(LineItem lineItem in CartHelper.LineItems) 
          {
            items.Add(lineItem); 
          }
    
        if (items.Count > 0) 
          {
            list.Add(provider.GetRate(row.ShippingMethodId, items.ToArray(), ref message)); 
          }
      }
```

To store information for a selected shipping method, use the LineItemproperties. You do not need to create a shipment object, since the **Cart Prepare** workflow handles this.

```csharp
ShippingMethodDto methods = ShippingManager.GetShippingMethods(SiteContext.Current.LanguageName); 
    
    ShippingMethodDto.ShippingMethodRow row = methods.ShippingMethod.FindByShippingMethodId(new Guid(ShippingRatesList.SelectedValue)); 
    foreach (LineItem lineItem in CartHelper.LineItems) 
      { 
        lineItem.ShippingMethodName = row.DisplayName; 
        lineItem.ShippingMethodId = row.ShippingMethodId; 
      }
```
