Adding Shipping Methods and Components

For business managers and most site developers, the process of adding shipping methods and installing components is straightforward. Shipping methods using installed components are added through Commerce Server Business Desk. For information about using Business Desk to add shipping methods, see Customizing Shipping Methods.

Similarly, installing third-party shipping pipeline components should be a matter of following the installation instructions.

Component developers, however, who need to test components or provide component installers, need to know how to add custom shipping methods to the multiple-shipment shipping architecture. This process is described in Adding a Custom Shipping Method.

Ee784160.important(en-US,CS.20).gif Important

  • Shipping components should expose the IPipelineComponentAdmin::GetConfigData and IPipelineComponentAdmin::SetConfigData methods from the IDispatch implementation, because the Business Desk module(s) that manage these components must be able to call these methods from a late-bound (Active Server Pages) environment.

Adding a Custom Shipping Method

Creating a Custom Shipping Method Page

Adding a Custom Shipping Method

The shipping method editing pages in Business Desk contain two sections, Shipping Method Properties and Rates. Component writers should implement these edit pages in any custom shipping method that they create. The framework handles some of the edit page implementation and all of the list page implementation.

The Shipping Method Properties section is responsible for getting data into and out of the ShippingConfig database table. This data is processed by the ShippingCommon_edit.asp page using edit fields in the top section of the Shipping Method Module in Business Desk. This section also sets up the taskbar for the page and handles all the necessary framework files to make the custom pages fully functional. Be sure to include the ShippingCommon_edit.asp page at the top of any custom shipping method page you create.

The custom shipping method page you create is responsible for processing data in the second section of the page, Custom Properties. This data will reside in the TableShippingRates database table.

Creating a Custom Shipping Method Page

To create a page for your custom data section, begin with an existing page such as the MinMax_edit.asp (or another of the Shipping Method pages) and then customize it.

To create a custom shipping method page

  1. At the top of the page, place a reference to include the file ShippingCommon_edit.asp.
  2. Replace the XML meta- and data-islands with your custom XML meta- and data-islands.
  3. Customize the DIV section to describe the new XML meta- and data-islands.
  4. If necessary, add hidden form input fields to hold values and an event handler (client-side).
  5. Replace the strings in GetActionPageName and GetActionFriendlyName with the names of your custom method page.
  6. Add code to the ProcessCustomShippingData function to handle task button events (loading and saving your custom data).

All the appropriate changes have been made to the shipping page and you are now ready to install it and use it in the Shipping Methods module in Business Desk.

To install the new page

  1. Add information about the new method to the Shipping_methods.xml file in the <drive:>\Inetpub\wwwroot\<Business Desk site name>\Config directory. This information notifies the framework that a new method exists and sets action (posting) information. It will then display the new method as a choice on the taskbar located on the list page, and it will handle posting correctly (see the Shipping_methods.xml file for an example).
  2. Add the new page to <drive:>\Inetpub\wwwroot\<Business Desk site name>\Shipping folder and install and register the custom DLL containing the shipping component (for example, Minmaxatl.dll). When Business Desk is reloaded, your custom module should appear on the menu of the Shipping Methods module list page. When editing this method, your custom components should appear in the lower section of the edit page.

Copyright © 2005 Microsoft Corporation.
All rights reserved.