Order Level Discount Pipeline Components

Location in SDK: SDK\Samples\Order Processing\OrderLevelDiscountComponents

The Microsoft Commerce Server 2002 Software Development Kit (SDK) contains two extendable pipeline components: OrderLevelDiscountsApply and ShippingDiscountsApply. The components in the SDK are exactly the same as the components included in the platform except they have distinct Programmatic Identifiers and the source code is available for the SDK pipeline components. Because the SDK pipeline components have unique Programmatic Identifiers, both the platform and SDK components can be registered at the same time.

To create and use the extendable pipeline components, you must perform three procedures.

To build the OrderLevelDiscountsComponents.dll file

To add the OrderLevelDiscountsApply component to a pipeline

To add the ShippingDiscountsApply component to a pipeline

To build the OrderLevelDiscountsComponents.dll file

Before you start this procedure, you must update the Include files for Microsoft Visual C++. For information on updating the Include files, see To update Microsoft Visual C++.

  1. On the Start menu, point to Programs, point to Microsoft Visual Studio 6.0, and then click Microsoft Visual C++.

  2. On the File, click Open.

  3. On the Open dialog box, change Files of type to All Files, and then navigate to the <drive>:\Program Files\Microsoft Commerce Server\2002\SDK\Samples\OrderProcessing\OrderLevelDiscountComponents directory, select OrderLevelDiscountsComponents.dsw, and then click Open.

  4. On the Build menu, click Build OrderLevelDiscountsComponents.dll.

  5. On the File menu, click Save Workspace, and then click Exit.

    Ee797531.note(en-US,CS.20).gifNotes

    • Visual Studio automatically registers the component it compiles. If an error occurs, register it manually.
    • The directory that the DLL resides in should allow IUSR_<computer name> account access.

To add the OrderLevelDiscountsApply component to a pipeline

  1. Click Start, point to Programs, point to Microsoft Commerce Server 2002, and then click Pipeline Editor.

  2. On the File menu, click Open, and then select the pipeline you want to modify. For example, <drive>:\Inetpub\wwwroot\Retail\Pipeline\basket.pcf.

  3. Right-click the OrderDiscount component, point to Insert Component, and then click After.

    The Choose a component dialog box appears.

    Ee797531.note(en-US,CS.20).gifNote

    • The OrderLevelDiscountsApply component should always be placed in the Order Adjust Price stage, between the OrderDiscount and RequiredOrderAdjustPriceCy components.
  4. In the Choose a component dialog box, select OrderLevelDiscountsApply SDK from the Component window, and then click OK.

  5. To configure the new component, right-click the OrderLevelDiscountsApply component, and then click Properties.

  6. In the Component Properties dialog box, do the following:

    Use this To do this
    Apply discounts to all items Apply order level discounts to all items in the order form.
    Apply discounts to items where the following key exists and the corresponding value is nonzero Apply order level discounts only to items in the order form where the specified item dictionary key exists and the corresponding value is nonzero.
  7. Click Apply, and then click OK.

  8. On the File menu, click Save, and then click Exit.

    The new component is added to your pipeline.

To add the ShippingDiscountsApply component to a pipeline

  1. Click Start, point to Programs, point to Microsoft Commerce Server 2002, and then click Pipeline Editor.

  2. On the File menu, click Open, and then select the pipeline you want to modify. For example, <drive>:\Inetpub\wwwroot\Retail\Pipeline\total.pcf.

  3. Right-click the Commerce.ShippingMethodRouter component, point to Insert Component, and then click After.

    The Choose a component dialog box appears.

    Ee797531.note(en-US,CS.20).gifNote

    • The ShippingDiscountsApply component should always be placed in the Shipping stage, following the Commerce.ShippingMethodRouter component.
  4. In the Choose a component dialog box, select ShippingDiscountsApply SDK in the Component window, and then click OK.

  5. To configure the new component, right-click the component, and then click Properties.

  6. In the Component Properties dialog box, do the following:

    Use this To do this
    Label Type a name for the component.
    Class ID Type a globally unique identifier for the component.
    Program ID Type the programmatic identifier for the component.
    Description Type a description for the component.
  7. Click Apply, and then click OK.

  8. On the File menu, click Save.

The new ShippingDiscountsApply component is added to your pipeline.

See Also

OrderDiscount

OrderLevelDiscountApply

ShippingDiscountAdjust

Business Desk Campaigns

Copyright © 2005 Microsoft Corporation.
All rights reserved.