Knowledgebase

Home » Item #714

Different currency used on front- and back-end

Item: #714
Date: 29 Nov 2003
Applies to
v5

Question

I would like to set my actual back-end currency to euro but i want the front-end page to be in US dollars (ie. when the default page loads up to a user, the user then sees prices in USD not in euros. When i enter into the back-end area all my values are in euros still).

Is such a setup possible?

Answer

This isn't directly possible, but wouldn't take much modification to get something like this working.

You will firstly need to configure your currencies. You'll need to set up Currency 1 as the backend currency (in this case, to Euro). You'd then need to set Currency 2 to USD. Make sure both of these currencies are set to Live on the front end. (for more information on setting up multiple currencies, see KB#709: Setting up multiple currencies.)

Now all we need to do is force the user to 'select' the second currency. First, remove the currency dropdown from the skin (look for xxxCURRENCYMENUxxx).

Then load up includes/config.asp. Around line 139 you should see the following code:

If InStr(request.ServerVariables....
   numCurrencyID = 1
else
   numCurrencyID = Request.QueryString("numCurrencyID")
   If numCurrencyID = "" then
      numCurrencyID = request.cookies(Application(...
   End if
   If numCurrencyID = "" then
      numCurrencyID = request.form("numCurrencyID")
   End if
   If numCurrencyID = "" or Not Isnumeric(numCurrencyID) then
      numCurrencyID = 1
   End if
   response.cookies(Application(LICENSENUMBER & ...
end if
Change this to the following:
If InStr(request.ServerVariables("PATH_INFO"), "/_") then
   numCurrencyID = 1
else
   numCurrencyID = 2
end if
This will force the customer to select currency ID 2.

Can't find the answer you need? Click here to open a support ticket.

« Back