ShippingMethodManager.SetMethodConfig Method (PIA)

Use this method to set properties, such as name or description, on the current shipping method.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Orders
…
Public Sub SetMethodConfig(ByRefParametersAndValues As Object)

[C#]

using Microsoft.CommerceServer.Interop.Orders;
…
public void SetMethodConfig(ref objectParametersAndValues);

Parameters

[Visual Basic .NET]

  • ParametersAndValues
    A System.Array containing name and value pairs in successive elements.

[C#]

  • ParametersAndValues
    A reference to an object containing a System.Array that contains name and value pairs in successive elements.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

This method acts on the loaded shipping method. You must call LoadMethodInstance or CreateMethodInstance to load a shipping method into the ShippingMethodManager object before calling this method.

The array parameter contains names and values in alternating elements. Odd subscripts contain the names of items, even subscripts contain the values.

Use the SaveMethodConfig method to save the configuration information entered with this method.

[Visual Basic .NET]

Example

' oSMM is a Commerce.ShippingMethodManager object
Dim aParamsAndValues() As Object
aParamsAndValues(0) = "shipping_method_name"
aParamsAndValues(1) = "My Shipping Method"
aParamsAndValues(2) = "description"
aParamsAndValues(3) = "Cheapest but slowest shipping method"
aParamsAndValues(4) = "enabled"
aParamsAndValues(5) = 1
oSMM.SetMethodConfig(aParamsAndValues)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: cs_shipmgr (in cs_shipmgr.dll)

See Also

Splitter

Shipping Class

ShippingDiscountAdjust

ShippingManagerCache

ShippingMethodManager Class

ShippingMethodRouter

StepwiseShipping

Copyright © 2005 Microsoft Corporation.
All rights reserved.