Post edited 1:10 pm - March 5, 2010 by Market Admin
Ok, here's a set of step by step instructions for changing the currency in which your website operates in.
UPDATE: With the release of Market version 3.5, you can now easily select the currency of your store from a new easy-to-use dropdown box located under the "Market Theme" menu tab of the Wordpress administration area.
Open single.php (located within your Market theme folder), find the following line:
Change the dollar sign between the <strong> and </strong> tags to the Unicode number of your currency symbol. (eg. British pound (£) = £ Euro (€) = € ). Just putting in the symbol itself doesn't always work, so using the Unicode number (eg. "£" or "€" ) is more dependable. After you insert the Unicode number for British pound, it should look like:
Change "USD" to "GBP". Market version 3 contains this line two separate times, so make sure to change both. ("GBP" is the Paypal abbreviation for British Pounds. I believe "EUR" is the abbreviation for Euro. If you want currency in a different language, make sure you use the correct Paypal abbreviation which you can find within the Paypal multiple currencies documentation.)
So, to recap -- you will change two different lines so that they now look like this:
(This is assuming that you are changing to "British pounds" -- GBP. Insert your own currency code.)
Next, find the following line.
<input type="hidden" name="lc" value="US">
Replace it with the 2 letter Paypal Country Code (You'll find it listed here). Enter "GB" for Britsih pounds, to make it look like this:
<input type="hidden" name="lc" value="GB">
Starting with Market version 3, there are also two separate instances of this line, so make sure to change both.
Save the file.
Next open up cart.php. This is located within the "ajCart" sub-folder (wp-contentthemesmk3ajCart).
Do a search for the following line:
$Shipping = 'Shipping: $'.$Shipping;
Change the dollar sign WITHIN the single quotes to the Unicode value for British pounds, (or Euro, etc.) as you did above in step #1. It should look like the following:
Replace the first dollar sign immediately after the <td> with the same Unicode British pound symbol, euro symbol, or whatever currency you're using. It should look like this:
Again, change the dollar sign with your unicode number for your desired currency like you did in the previous step. (replace between the <strong> and </strong> tags.
Save the file.
Lastly, open the file cart_bottom.php. This is located within the "ajCart" sub-folder (wp-contentthemesmk3ajCart).
If you're using Market version 3.3 or later, it's been modified a little from before so there are a few more changes you'll need to make. In addition to the steps above, follow these steps as well.
Open up the file "single.php" again for editing.
Scroll down to around line 159 and find the following lines:
if (isset($shipping[0]) && $shipping[0]!="") { echo "<option value="$shipping[0]">Standard ($".$shipping[0].")</option>"; } if (isset($shipping[1]) && $shipping[1]!="") { echo "<option value="$shipping[1]">Priority ($".$shipping[1].")</option>"; } if (isset($shipping[2]) && $shipping[2]!="") { echo "<option value="$shipping[2]">International ($".$shipping[2].")</option>"; }
Within each of these three lines is are 5 dollar signs ($). THE FOURTH ONE in each line needs to be replaced with your currency unicode number. -- The ones in ">Standard ($" , ">Priority ($" , and ">International ($" .
So, for example, if you were changing to British pounds, the modified code would look like this:
if (isset($shipping[0]) && $shipping[0]!="") { echo "<option value="$shipping[0]">Standard (£".$shipping[0].")</option>"; } if (isset($shipping[1]) && $shipping[1]!="") { echo "<option value="$shipping[1]">Priority (£".$shipping[1].")</option>"; } if (isset($shipping[2]) && $shipping[2]!="") { echo "<option value="$shipping[2]">International (£".$shipping[2].")</option>"; }
In a similar fashion, if you scroll down to around line 250, you will see another three lines like this:
Yes, in the next version I'd like to make the currency related stuff changeable within the Product Manager admin tool. I'm actually talking with our developers right now about it.
The code modification above is the only option as of now. It will guide you through the process of changing currencies.
Quickly selecting different currencies is a feature that a coder is working on right now for a future release. It will be able to be set within the product manager.
This particular feature isn't included within the release that's coming out in a day or so, but it's in the next iteration.
Just to clarify what I was asking is whether the buyer can select the choice of currency from a drop down box at the point of sale rather than it being one fixed currency set by the sellers individual coding for the product. Obviosuly this will require a currency conversion configuartion as we currently have in OSCommerce.
I'm interested in the possibility of upgrading to the developers licence so I'm wondering if I can get my techie to insert the necessary code to do this without too much problem?
The new release doesn't have that ability, however when the customer is transferred over to Paypal -- Paypal will display the amount in the buyer's own currency.
I understand that doesn't give them an idea of how much before they decide to purchase.
It could be done with a little bit of PHP programming, but you'll need to integrate it with some sort of currency exchange functionality that would need to tie into some other online reference to get the current exchange rates.
I have done all the changes everything seems to work fine on the site but when it transfers to paypal it goes back to USD. If i choose buy it now it is fine in GBP.This only happens if i choose add to cart then checkout
There are two sections of the code in "single.php" that look very similar. One for the "Buy Now" code and another for the "Add to Cart" code. You must make sure you change both. It sounds to me like you only changed one section.