Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changed the default currency


KenBarlow

Recommended Posts

Posted

Hi,

 

My site has options for EUR, USD and GBP. I used to have GBP as the default currency, but have recently changed it to USD. All the products are being replaced, so the currency change did not cause any problems with their pricing. Also I have updated the shipping costs to use the new currency.

 

The problem I am having is, while everything on my shop site is working correctly (totals are shown correctly and the prices change correctly as I select between the currencies), when you go to the Paypal site to complete the transaction the price is shown incorrectly.

 

It is only on the Paypal site that the total price is incorrect. It seems to try to convert GBP to GBP using the USD to GBP exchange rate, even though the currency was selected as GBP already.

 

I am at a loss as to why it is doing this, I have examined the shop configuration and the Paypal (IPN) configuration and cannot see a reason for it.

 

Any advice would be very, very gratefully received!

 

Thanks in advance.

Posted

You might need to update english.php

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'USD');

Posted

You might need to update english.php

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'USD');

 

Thank you for your suggestion.

 

"Use default currency for selected language" was not switched on, although I have since tried it with it on. This just prevented me from using GBP at all, which is I think expected.

 

I have also checked the LANGUAGE_CURRENCY setting, as you suggest, and it is set to USD already. I presume the setting has no effect if USE_DEFAULT_LANGUAGE_CURRENCY is false.

 

 

 

I have been looking through the php code to see if I can locate where the problem is occurring. I am by no means a php programmer, but am a competent C programmer so the code makes some sense to me. The first thing I need to determine is example where the error is introduced, on my server before it sends the request to PayPal, or once the request has already gone to PayPal. I assume the former.

 

From what I can see the request to PayPal is generated within the PayPal_ipn php file, after the process() function is called. I have noted that my process() function does not seem to mention currencies, whereas later versions, and the version included in OSCommerce V5 alpha does. I might attempt to update the PayPal IPN files, although the latest contains quite a lot of German text, which makes me a little nervous of doing this (not because I have anything against German, just because I don't fully understand what it is doing, not being a German speaker myself).

 

The other thing that would be good to do is be able to debug the php code, but being a server side thing I'm not sure how to do that.

 

Again - any other advice people can offer will be gratefully appreciated.

Posted

I vaguely remember that with AUD you had to make or use a special PayPal version.

 

 

Maybe if you do a search you might find more information about how to handle PayPal when it is not USD?

 

Not sure if you have to do something similiar for GBP.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...