MoneyConverter

Use this component to convert OrderForm object keys and values from integers to the new currency type, or from the new currency type to integers.

Intended use: Order Processing pipeline, any stage.

Configuration Values

You can determine which conversion the MoneyConverter component performs as well as the fields converted by setting component properties. Use the following boxes on the Convert Money tab of the Component Properties dialog box to determine this information.

Box Description
Convert currency to int Converts currency values to integer values.
Convertinttocurrency Converts integer values to currency values.
CurrencyFields This box contains a space-separated list of the currency fields. The integer fields have the same name but without the cy_ prefix. Prefix item-level fields with item. and order level elements with order.. See the Remarks section for more information.

Values Read

The fields specified in the Currency Fields box.

Values Written

The fields specified in the Currency Fields box.

Remarks

Use the MoneyConverter component in pipeline stages containing Site Server 3.0 Commerce Edition and Commerce Server 2000 components, or Site Server 3.0 Commerce Edition and Commerce Server 2002 pipeline components using currency representations.

If a pipeline stage contains only Site Server 3.0 Commerce Edition objects, or only Commerce Server 2000 and Commerce Server 2002 objects, you do not need to use the MoneyConverter component. The various required components (RequiredItemPrice, for example) automatically perform currency and integer conversions at the end of a pipeline stage.

When converting values, the component gets the value of the key, converts it, and assigns it to the key of the other type. For example, suppose that you are converting the old integer currency value item._oadjust_adjustedprice. The MoneyConverter component gets the value from this key, converts it to the new currency data type, and assigns the converted value to the item._cy_oadjust_adjustedprice key. Values may be rounded during conversion. For more information about rounding, see Currency Enhancements.

The only difference between the keys is the cy_ in the name of the key holding the currency value. The currency key that is specified in the Component Properties dialog box regardless of the direction of the conversion.

See Also

DataFunctions Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.