Develop > Persistence layer > Data assets
Add a currency
You can add a currency by loading an XML file.
To add a currency to the store using an XML file:
Procedure
- Create an XML file that uses the wc.dtd as shown in the following example:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE import SYSTEM "wcs.dtd"> <import> <!-- Insert currency asset information here --> </import>
- Within the import element, add CURLIST elements followed by CURCONVERT elements.
You must populate these columns of the CURLIST table:
- storeent_id
- currstr
You must populate these columns of the CURCONVERT table:
- storeent_id
- fromcurr
- tocurr
- factor
- multiplyordivide
- bidirectional
- updatable
- curconvert_id
- Optionally, to display prices both in the shopping currency, and a counter currency (for example, display prices in both the Netherlands guilder and the euro), also add information to the CURCVLIST table.
You must populate these columns of the CURCVLIST table:
- storeent_id
- currstr
- countervaluecurr
- displayseq
- Run the idresgen utility to resolve entities in the XML file.
- Run the massload utility against the XML file to load your data into the target database.
- Supported currencies
WebSphere Commerce supports ISO 4217 code for each international currency. You define these currencies when you install the product.
- Changing the rounding multiple
You can change the rounding multiple used by different currencies.
- Load the data to the WebSphere Commerce database
You can load currency information to the WebSphere Commerce database.
- Add or changing a currency conversion
Complete the following steps to add or change a currency conversion.
- Add a customized currency code
Complete the following steps to add a customized currency code.
- Add supported currencies
Complete the following steps to add a new supported currency.
- Add EMU currencies
You may need to add more currencies if more countries join the European Monetary Union (EMU) and to support their currencies.
- Changing decimal places
Complete the following steps to change the number of decimal places.
- Changing the currency format
Complete the following steps to customize currency information to change the display format.
- Changing the currency suffix
Complete the following steps to change the suffix of the currency amount:
- Changing the currency prefix
Complete the following steps to change the prefix of the currency amount:
- Changing the rounding method
Complete the following steps to change the rounding method:
- Changing the currency symbol
Complete the following steps to change the currency symbol:
- Define new number usages
If the application needs to round or format quantities or monetary amounts differently depending on their purpose, you can create new number usages.
Related tasks
Related reference
massload utility (Server environment)
Database asset groups dependencies