Creating new resource bundles for custom text strings
In this lesson, you create a new properties file and resource bundle to define
the custom text strings to display on the Management Center user interface for your customized
widgets. In the Management Center, all text labels and images displayed in the user interface must
be defined as properties and registered in a resource bundles file.
About this task
Text string | Description | Resource key |
---|---|---|
"Minimum Purchase on base catalog entries ($)" | The label for the total price threshold for the purchase condition | promotion_Minimum_purchase_TotalPrice |
"Quantity for free" | The label for the gift quantity for the reward | promotion_Free_gift_qty |
"Spend $ on catalog entry X, get catalog entry Y free" | The name of the new promotion type that appears in the Promotion Type Selector window | promotion_type_ProductLevelFreeGift |
"Purchase condition: Order contains a specified amount spent on a catalog
entry. Reward: One or more free gifts. Example: "Spend $100 or more on KitcheCraft Chef Line Knife Set, and receive a Vienna glass free!" |
The description of the new promotion type that appears in the Promotion Type Selector window | promotion_type_description_ProductLevelFreeGift |
Procedure
- Open WebSphere Commerce Developer.
-
Create a new package for the properties file:
- In the Enterprise Explorer view, expand .
- Right-click the src folder, and select .
- In the New Java Package window, create a properties package that is named com.mycompany.commerce.promotion.client.lobtools.properties.
- Click Finish.
-
In the new properties package, create the properties files for your promotion type:
-
Create a new directory structure for your custom code:
-
The new text strings added in the properties file cannot be used by Magement Center definitions
directly. Register the properties with the new resource bundles: