Jaa


How to Modify the Display Names of Orders Objects in the Customer and Orders Manager

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Commerce Server uses configuration files named LanguageCode_OrdersPresentationInfo.xml to determine the names to display in the Customer and Orders Manager for classes and their properties. Several Commerce Server APIs — for example, GetDetailedTypeInformation — also return these display names. If you replace a core Orders class with a derived class, you must modify the LanguageCode_OrdersPresentationInfo.xml files to indicate how the Customer and Orders Manager should refer to your new class and its properties.

This topic introduces the format of the LanguageCode_OrdersPresentationInfo.xml files, provides a procedure for modifying a LanguageCode_OrdersPresentationInfo.xml file, and includes an excerpt from the en_OrdersPresentationInfo.xml file.

XML Format

The following table lists the three types of elements in the LanguageCode_OrdersPresentationInfo.xml file.

Element

Description

Contents

PresentationConfiguration

Describes how to refer to Orders classes and properties in a given language.

One or more Class elements

Class

Describes how to refer to an individual Orders class and its properties.

One or more Property elements

Property

Describes how to refer to a specific property of an Orders class.

None

The following table lists the attributes of each element in the LanguageCode_OrdersPresentationInfo.xml file.

Element

Attribute

Data Type

Description

PresentationConfiguration

CultureCode

String

The two-letter culture code for the language that the class and property display names are in.

Class

Name

String

The name of the class that will be displayed to the user. This is either the name of a core Orders class or the name of a derived class that replaces a core Orders class.

Class

DisplayName

String

The word or phrase that the user will see in the Customer and Orders Manager instead of the class name.

Property

Name

String

The name of a property within the class that will be displayed to the user.

Property

DisplayName

String

The word or phrase that the user will see in the Customer and Orders Manager instead of the property name.

Modifying the <LanguageCode>_OrdersPresentationInfo.xml File

The following procedure describes how to modify the LanguageCode_OrdersPresentationInfo.xml file for a single language. If you replace a core Orders class with a new derived class, and you intend your application to be available in multiple languages, you must update the LanguageCode_OrdersPresentationInfo.xml files for all languages that you support.

How to modify the <LanguageCode>_OrdersPresentationInfo.xml file

  1. Edit the LanguageCode_OrdersPresentationInfo.xml file in the directory where you deployed the Orders Web service.

  2. If you are updating the display name of a class, find the name of the class whose display name you want to update. If you are updating the display name of a property, find the name of the class that contains the property whose display name you want to update.

  3. If you want to update the display name of the class, modify the value of the DisplayName attribute of the Class element.

  4. If you want to update the display name of a property of the class, modify the value of the DisplayName attribute of the Property element within the Class element.

  5. Save the file.

  6. To make the Customer and Orders Manager use the modified LanguageCode_OrdersPresentationInfo.xml file, reset IIS and then restart the Customer and Orders Manager.

How to add a derived class to the <LanguageCode>_OrdersPresentationInfo.xml file

  1. Edit the LanguageCode_OrdersPresentationInfo.xml file in the directory where you deployed the Orders Web service.

  2. Delete the entire Class element whose Name attribute is the name of the core Orders class that you are replacing.

  3. Add a new Class element within the PresentationConfiguration element. Set the Name attribute of the new Class element to the name of your derived class. Set the DisplayName element of the Class element to the name that should be displayed to the user instead of your class name.

  4. Add a new Property element within the Class element that you just created. Set the Name attribute of the new Property element to the name of a property of your derived class. Set the DisplayName element of the Property element to the name that should be displayed to the user instead of the property name.

  5. Repeat step 4 for every property of your derived class.

  6. Save the file.

  7. To make the Customer and Orders Manager use the modified LanguageCode_OrdersPresentationInfo.xml file, reset IIS and then restart the Customer and Orders Manager.

Sample LanguageCode_OrdersPresentationInfo.xml File

The following XML fragment comes from the en_OrdersPresentationInfo.xml file.

<PresentationConfiguration CultureCode="en">
    <Class Name="PurchaseOrder" DisplayName="Purchase order">
        <Property Name="BillingCurrency" DisplayName="Billing currency" />
        <Property Name="TrackingNumber" DisplayName="Tracking number" />
        <Property Name="BasketId" DisplayName="Basket ID" />
        <Property Name="OrderGroupId" DisplayName="Order group ID" />
        <Property Name="Name" DisplayName="Purchase order name" />
        <Property Name="SoldToId" DisplayName="Buyer ID" />
        <Property Name="SoldToAddressId" DisplayName="Buyer address ID" />
        <Property Name="LineItemCount" DisplayName="Number of items" />
        <Property Name="ShippingTotal" DisplayName="Shipping charges" />
        <Property Name="HandlingTotal" DisplayName="Handling charges" />
        <Property Name="TaxTotal" DisplayName="Tax" />
        <Property Name="SubTotal" DisplayName="Sub total" />
        <Property Name="Total" DisplayName="Total" />
        <Property Name="Created" DisplayName="Date created" />
        <Property Name="LastModified" DisplayName="Date last modified" />
        <Property Name="ModifiedBy" DisplayName="Last modified by" />
        <Property Name="OrderForms" DisplayName="Order forms" />
        <Property Name="Addresses" DisplayName="Addresses" />
        <Property Name="Status" DisplayName="Order status" />
        <Property Name="SoldToName" DisplayName="Buyer name" />
    </Class>
    <Class Name="OrderForm" DisplayName="Order form">
        <Property Name="OrderFormId" DisplayName="Order form ID" />
        <Property Name="OrderGroupId" DisplayName="Order group ID" />
        <Property Name="Name" DisplayName="Order form name" />
        <Property Name="BillingAddressId" DisplayName="Billing address ID" />
        <Property Name="PromoUserIdentity" DisplayName="Promotion code user identity" />
        <Property Name="SubTotal" DisplayName="Sub total" />
        <Property Name="ShippingTotal" DisplayName="Shipping charges" />
        <Property Name="HandlingTotal" DisplayName="Handling charges" />
        <Property Name="TaxTotal" DisplayName="Tax" />
        <Property Name="Total" DisplayName="Total" />
        <Property Name="Created" DisplayName="Date created" />
        <Property Name="LastModified" DisplayName="Date last modified" />
        <Property Name="ModifiedBy" DisplayName="Last modified by" />
        <Property Name="Payments" DisplayName="Payments" />
        <Property Name="LineItems" DisplayName="Line items" />
        <Property Name="Shipments" DisplayName="Shipments" />
        <Property Name="PromoCodeRecords" DisplayName="Promotion code records" />
        <Property Name="Status" DisplayName="Order form status" />
    </Class>
</PresentationConfiguration>

See Also

Other Resources

How to Derive a New Orders Class

How to Modify the Orders Configuration Files