| Setting Up Your Store > Setting Up Your Currencies > The Currency Menu |
The Currency Menu
|
Related Topics: ISO Standardized Currency Code |
How to access: Login to the Admin Site. Go to Misc and then click Currencies.
What is Currency?
In general term, a currency is a unit of exchange, facilitating the transfer of goods and services. It is a form of money, where money is defined as a medium of exchange (rather than e.g. a store of value). A currency zone is a country or region in which a specific currency is the dominant medium of exchange. To facilitate trade between currency zones, there are exchange rates i.e. prices at which currencies (and the goods and services of individual currency zones) can be exchanged against each other.
In AspDotNetStorefront, setting your currency appropriately is crucial in your storefront's performance. Your storefront's currency setting should match with your locale(language), to be able to accept payments and trade with your customers in your target market (countries).
IMPORTANT:
The PRO Version only offers US Locale and USDollar Currency. The ML version has the capability to change your Locale settings (e.g. en-GB) and currency (e.g. GBP). Click here to know more about the difference of PRO and ML version.
How to add/edit your Currency?
NOTE: You should add/define your currencies first, before adding languages (locale settings) so you will then have that currency available when you add/define the new locale/language. Each language locale has a default currency defined. You set this when you install the language (Misc -> Locale Settings).
Now, for multi-currency, you should setup currencies in the admin site under Misc -> Currencies. This will be defined more below.
You can also mix languages and currencies. For instance, your master language/currency could be English, you could have Japanese language installed, and Swedish kr currency setup, so you "could" have a customer who wants to view your "USD/English" site in Japanese, and view all prices Swedish krono's.
By going into Misc => AppConfig Parameters or use the View/Edit AppConfig link on the left side of the Admin Home page. You are able to manage additional currencies.
1. You should set the name of the currency. We preload the table with 25 currencies by default. You should delete the ones you will not use, to avoid later possible confusion!
2. You should set the Code that is wanted and needed to the ISO currency code (e.g. USD)
3. Symbol field is almost never used, and usually blank.
4. You can manually enter your exchange rates if you want, based on the "currency feed base currency code". You can also use a live exchange rate feed (see below).
5. You must enter either the DisplayLocale (any valid .net locale) set, or the Display Spec set (any ".net format string" valid string) (e.g. €x,xxx.xx). Please Note: If you have NEITHER of these fields entered, the store will NOT know how to display the currency and you will get a run-time error. The display locale is a shortcut way of specifying the formatting, if possible. if you need exact control over the currency formatting, or there IS NO .net locale corresponding to it (e.g. Brazilian Real), then you must enter a display spec format string.
6. You should publish only those currencies you want to show in the store, and delete all others. You could add them back later if you needed.
7. Enter the number you would like the currency to be displayed. Example, if the currency will be the first then you will enter 1.
The currency feed URL is called by our XmlPackage which formats the feed into a predefined output format, for loading into the database. You can customize both the feed URL and XmlPackage to pull from almost any exchange rate provider you want to use. By default, we provide a sample that uses the free European central bank exchange rates.
The base currency for the feed just tells the store the currency code that the exchange rate feed's rates are relative to.
You MUST set this to a valid currency code, or the store will not know how to apply the exchange rates in the table. This MAY or MAY NOT be the same as your AppConfig:Localization.StoreCurrency code!
Note: The Currency Feed Base Currency code DOES NOT have to be the same as the store base currency (AppConfig:Localization.StoreCurrency).
See also ISO Standard Currency Code.
To help you debug the live rate call and response, at the bottom of the page is the raw response from the feed call, along with the raw output from the XmlPackage. The XMLPackage output handling the feed MUST provide an xmlbased output like:
The XMLPackage for this MUST reside in the /admin/XMLPackages dir. you can use any feed you want (e.g. x-rates.com, whatever). You just have to write the XMLPackage to handle it properly, to provide the currency exchange rates in our defined XmlFormat.
Example:When calling the European central bank, it returns (as part of the XMLPackage raw data):
<root>
<System>
<IsAdminSite>True</IsAdminSite>
<IsAdminSiteInt>1</IsAdminSiteInt>
<PublishedOnly>0</PublishedOnly>
<CustomerID />
<CustomerLevelID>0</CustomerLevelID>
<CustomerLevelName />
<CustomerFirstName />
<CustomerLastName />
<CustomerFullName />
<IsAdminUser>false</IsAdminUser>
<IsSuperUser>false</IsSuperUser>
<LocaleSetting>en-US</LocaleSetting>
<CurrencySetting>USD</CurrencySetting>
<WebConfigLocaleSetting>en-US</WebConfigLocaleSetting>
<SqlServerLocaleSetting>en-US</SqlServerLocaleSetting>
<PrimaryCurrency>USD</PrimaryCurrency>
<PrimaryCurrencyDisplayLocaleFormat>en-US</PrimaryCurrencyDisplayLocaleFormat>
<Date>5/6/2006</Date>
<Time>10:23 AM</Time>
<SkinID>1</SkinID>
<AffiliateID>0</AffiliateID>
<IPAddress />
<QueryStringRAW>update=true</QueryStringRAW>
<UseStaticLinks>false</UseStaticLinks>
<PageName>currencies.aspx</PageName>
<FullPageName>/AspDotNetStoreFront6/Admin/currencies.aspx</FullPageName>
<XmlPackageName>feed.exchangerates-eur.central.bank.xml.config</XmlPackageName>
<StoreUrl>http://localhost/AspDotNetStoreFront6/</StoreUrl>
<CurrentDateTime>Sat, 06 May 2006 17:23:46 GMT</CurrentDateTime>
</System>
<QueryString>
<update>true</update>
</QueryString>
<Form />
<Session>
<securitycode>286382</securitycode>
<customerid>58639</customerid>
<customerlevelid>0</customerlevelid>
<customerguid>6fd628f4-e75a-4542-aff8-36a79dbc0aaa</customerguid>
</Session>
<ServerVariables>
<HTTP_HOST>localhost</HTTP_HOST>
<HTTP_USER_AGENT>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)</HTTP_USER_AGENT>
<AUTH_TYPE>Forms</AUTH_TYPE>
<AUTH_USER>6fd628f4-e75a-4542-aff8-36a79dbc0aaa</AUTH_USER>
<AUTH_PASSWORD />
<HTTPS>off</HTTPS>
<LOCAL_ADDR>127.0.0.1</LOCAL_ADDR>
<PATH_INFO>/AspDotNetStoreFront6/Admin/currencies.aspx</PATH_INFO>
<PATH_TRANSLATED>C:\websites\6.1\Web\Admin\currencies.aspx</PATH_TRANSLATED>
<SCRIPT_NAME>/AspDotNetStoreFront6/Admin/currencies.aspx</SCRIPT_NAME>
<SERVER_NAME>localhost</SERVER_NAME>
<SERVER_PORT_SECURE>0</SERVER_PORT_SECURE>
</ServerVariables>
<Runtime>
<AffiliateID>0</AffiliateID>
<CustomerID />
<CustomerLastName />
<IsAdminUser>false</IsAdminUser>
<CurrencySetting>USD</CurrencySetting>
<UseStaticLinks>False</UseStaticLinks>
<Date>5/6/2006</Date>
<QueryStringRAW>update=true</QueryStringRAW>
<CustomerLevelName />
<StoreUrl>http://localhost/AspDotNetStoreFront6/</StoreUrl>
<Time>10:23 AM</Time>
<SkinID>1</SkinID>
<PrimaryCurrencyDisplayLocaleFormat>en-US</PrimaryCurrencyDisplayLocaleFormat>
<IsAdminSite>True</IsAdminSite>
<PrimaryCurrency>USD</PrimaryCurrency>
<CustomerLevelID>0</CustomerLevelID>
<CustomerFullName />
<CustomerFirstName />
<XmlPackageName>feed.exchangerates-eur.central.bank.xml.config</XmlPackageName>
<IsSuperUser>false</IsSuperUser>
<PublishedOnly>0</PublishedOnly>
<IsAdminSiteInt>1</IsAdminSiteInt>
<IPAddress />
<PageName>currencies.aspx</PageName>
<WebConfigLocaleSetting>en-US</WebConfigLocaleSetting>
<FullPageName>/AspDotNetStoreFront6/Admin/currencies.aspx</FullPageName>
<LocaleSetting>en-US</LocaleSetting>
<SqlServerLocaleSetting>en-US</SqlServerLocaleSetting>
</Runtime>
<feed>
<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">
<gesmes:subject>Reference rates</gesmes:subject>
<gesmes:Sender>
<gesmes:name>European Central Bank</gesmes:name>
</gesmes:Sender>
<Cube>
<Cube time="2006-05-05">
<Cube currency="USD" rate="1.2688" />
<Cube currency="JPY" rate="144.51" />
<Cube currency="CYP" rate="0.5752" />
<Cube currency="CZK" rate="28.292" />
<Cube currency="DKK" rate="7.4570" />
<Cube currency="EEK" rate="15.6466" />
<Cube currency="GBP" rate="0.68680" />
<Cube currency="HUF" rate="259.80" />
<Cube currency="LTL" rate="3.4528" />
<Cube currency="LVL" rate="0.6960" />
<Cube currency="MTL" rate="0.4293" />
<Cube currency="PLN" rate="3.8149" />
<Cube currency="SEK" rate="9.3220" />
<Cube currency="SIT" rate="239.62" />
<Cube currency="SKK" rate="37.310" />
<Cube currency="CHF" rate="1.5615" />
<Cube currency="ISK" rate="91.18" />
<Cube currency="NOK" rate="7.7670" />
<Cube currency="BGN" rate="1.9558" />
<Cube currency="HRK" rate="7.2750" />
<Cube currency="RON" rate="3.4689" />
<Cube currency="RUB" rate="34.4120" />
<Cube currency="TRY" rate="1.6745" />
<Cube currency="AUD" rate="1.6482" />
<Cube currency="CAD" rate="1.4063" />
<Cube currency="CNY" rate="10.1713" />
<Cube currency="HKD" rate="9.8362" />
<Cube currency="IDR" rate="11152.75" />
<Cube currency="KRW" rate="1192.16" />
<Cube currency="MYR" rate="4.5753" />
<Cube currency="NZD" rate="1.9807" />
<Cube currency="PHP" rate="65.508" />
<Cube currency="SGD" rate="2.0001" />
<Cube currency="THB" rate="48.037" />
<Cube currency="ZAR" rate="7.6782" />
</Cube>
</Cube>
</gesmes:Envelope>
</feed>
</root>The output must then be converted to our defined format like:
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<root>
<updated>2006-05-05</updated>
<referencecurrencycode>EUR</referencecurrencycode>
<currency name="" code="USD" rate="1.2688" />
<currency name="" code="JPY" rate="144.51" />
<currency name="" code="CYP" rate="0.5752" />
<currency name="" code="CZK" rate="28.292" />
<currency name="" code="DKK" rate="7.4570" />
<currency name="" code="EEK" rate="15.6466" />
<currency name="" code="GBP" rate="0.68680" />
<currency name="" code="HUF" rate="259.80" />
<currency name="" code="LTL" rate="3.4528" />
<currency name="" code="LVL" rate="0.6960" />
<currency name="" code="MTL" rate="0.4293" />
<currency name="" code="PLN" rate="3.8149" />
<currency name="" code="SEK" rate="9.3220" />
<currency name="" code="SIT" rate="239.62" />
<currency name="" code="SKK" rate="37.310" />
<currency name="" code="CHF" rate="1.5615" />
<currency name="" code="ISK" rate="91.18" />
<currency name="" code="NOK" rate="7.7670" />
<currency name="" code="BGN" rate="1.9558" />
<currency name="" code="HRK" rate="7.2750" />
<currency name="" code="RON" rate="3.4689" />
<currency name="" code="RUB" rate="34.4120" />
<currency name="" code="TRY" rate="1.6745" />
<currency name="" code="AUD" rate="1.6482" />
<currency name="" code="CAD" rate="1.4063" />
<currency name="" code="CNY" rate="10.1713" />
<currency name="" code="HKD" rate="9.8362" />
<currency name="" code="IDR" rate="11152.75" />
<currency name="" code="KRW" rate="1192.16" />
<currency name="" code="MYR" rate="4.5753" />
<currency name="" code="NZD" rate="1.9807" />
<currency name="" code="PHP" rate="65.508" />
<currency name="" code="SGD" rate="2.0001" />
<currency name="" code="THB" rate="48.037" />
<currency name="" code="ZAR" rate="7.6782" />
</root>This xml doc (output from the XmlPackage) is then used to update the currency table exchange rate field. Any currency found and updated by the live rate is then marked on the page as (live). That (live) is only there right after the feed update occurs. on next page load, users have to use the LastUpdatedOn field to determine when the exchange rate was last updated. Not that not all exchange rate feeds return ALL currencies, so NOT ALL rates are marked as (live) updated!!
The Manage Currencies page consists of the following fields:
Fields Description & Usage Currency ID Auto assigned by the database that identifies each currency. Currency Name Name that identifies the currency of the region/country Currency Code Should be based on the ISO Standard Currency Code. Currency Symbol Symbol of the currency. Exchange Rate The price of one currency in terms of another, that is, the number of units of one currency that may be exchanged for one unit of another currency. Display Locale The Locale that uses this currency. Display Spec Pertains to how the amount in that currency will appear in the store. Published Specifies whether or not the currency appears on the live site. Last Updated On Shows the last date when it has been updated. Display Order Sets on how the currency would be displayed in the page in the order that you prefer. Delete Removes the currency from the Manage Currencies page. Update Changes Above Saves the changes made in the Manage Currencies page.
These new skin tokens are also now available:
(!CURRENCY_LOCALE_ROBOTS_TAG!) (should be in your skin header, if desired, and just adds a meta tag indicating the currency setting of the page).
(!CURRENCYDIVVISIBILITY!)
(!CURRENCYDIVDISPLAY!)
(!CURRENCYSELECTLIST!)A simple way of integrating this into your skin is shown in the following html:
<div style="visibility:(!CURRENCYDIVVISIBILITY!); display:(!CURRENCYDIVDISPLAY!);">Currency:(!CURRENCYSELECTLIST!)</div>
so it will actually "turn itself off" if only one currency is defined (no need to show a select list if only one currency).
Currency Setup Tips and Notes:
If you only have one published currency, the store will not show a currency selector, or show any currency symbol with prices. If more than 1 currency is defined and published, all prices are marked with the currently selected currency. When the user switches languages, the default currency set for that language will be used by default. The site visitor can change that later.
You should remove any currencies you will NOT need. You do this, by going to Admin -> Misc -> Currencies
Delete any currency that you would NOT be using. Do this first. We setup about 25 currencies by default, but get rid of the ones you don't need to avoid clutter or possible errors later in managing your currencies.
You should publish only those currencies you want to show in the store.
Users CAN even have a site in this kind of viewing state (it's possible, and valid):
IF multi-currencies are used, ALL prices now shows the currency that is being active when displaying the price (e.g. $4.95 (USD)) This occurs everywhere a price is shown.
NOTE: We do NOT automatically call the exchange rate url for you. Why not? Because some exchange rates can only be called once/day, 5 times per week, whatever. So to update your exchange rates using a live feed, you should go to this currency page in your admin site and just click "get live rates" button. That will update all exchange rates found in the feed. You can also test the conversion out using the test area on the page.
Open your web.config using Notepad, then look for these values:
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" uiCulture="en-GB"/>This has now would setup your "MASTER" currency as GBP, and the store will still load the "english" strings from en-US (which will work fine in this case), and then use en-GB to display currencies (and date/times also, etc).
** if you run the store at this time, you should see English strings and English pounds in pricing **
There are different scenarios in setting up currency. For example a single language, single (master) currency site (e.g. Swedish, etc.)
Users will set Currency Appconfig settings and the web.config settings (as seem above). Users must also change the language locale (culture) and currency/date-time culture (uiculture). For other languages you would also have the have language pack string files loaded.
For example: /stringresources/strings.sv-SE.xls, for swedish
Once you have your master currency setup, and removed unnecessary currencies (Please see Currency Setup Tips/Notes). Users can define how currencies are controlled using a feed exchange rate.
Localization.StoreCurrency
Localization.StoreCurrencyNumericCode
Localization.CurrencyFeedUrl
Localization.CurrencyFeedXmlPackage
Localization.CurrencyFeedBaseRateCurrencyCode
Localization.CurrencyCacheMinutes
Important Reminder: Always perform RESET CACHE when you make changes in your Currency.
System Requirements | Security Best Practices | Support & Upgrade Contracts | Downloads | Contact Us
Copyright © 1995-2006 All rights reserved.