Get Shipping Methods
Abstract
Developer tasks for using service method GetShippingMethods
.
GetShippingMethods
is used to retrieve the available shipping methods from Commerce Server to be used with the order system and placing orders.
At your Visual Studio Solution setup:
Reference the Sitecore.Commerce.Connect.CommerceServer and Sitecore.Commerce.dll.
Select the class in your solution where you want to use this service method.
To use the service method, paste the following code:
var provider = new CommerceOrderServiceProvider(); var request = new GetShippingMethodsRequest("en-us"); var result = provider.GetShippingMethods(request); var shippingMethods = result.ShippingMethods;