Set the currency preference for the user running this command. For a generic user--one for whom there is no information stored--the preference will apply for the duration of the session only. For all other users the currency preference will be saved with the user's profile.
Command structure
- http://host_name/path/
- The fully qualified name of your WebSphere Commerce Server and the configuration path
Parameter values
- forUser
- The logon ID of the user on whose behalf the command will be run; only a person with a security role of Customer Service Representative (or those roles that include the CSR tasks) can specify this parameter
- forUserId
- Same as forUser, but identifying the user by the internal user ID, as found in the USERS table
- langId
- Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table
- URL (Required)
- The URL to be called when the command completes successfully
- currency (Required)
- The three-letter ISO code for the currency that will become the preferred currency for this customer.
Example
This example changes a customer's preferred currency to Canadian dollars (CAD). If the command is successful, FVTestSite.jsp will display.
http://myhostname/webapp/wcs/stores/servlet/SetCurrencyPreference?currency=CAD &URL=FVTestSite.jsp
Behavior
- For all non-generic users, sets a currency preference in the user's profile. The group of non-generic users includes both registered members and non-registered members for whom there is some profile information stored.
- If there are any pending orders this command changes the currency of those orders to the shopping currency and recalculates the prices.
- Calls the SetCurrencyPrefCmd task command to change the order prices.
- Shopping currency
Exception Conditions
If no price could be found for any of the products or items in a pending order, the command throws the ECApplicationException exception specifying the RetrievePriceError error view command.