Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Currency update, still not working.


Peter@20ghz

Recommended Posts

Could maybe anyone post the code from there working localization.php ?

 

Sinze i still not can update my curencys i need to see what might be the difference in the code.

I still get this messages.

 

First this

Warning: file(): URL file-access is disabled in the server configuration in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 15

 

Warning: file(http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=USD&format=CSV&dest=Get+Table&sel_list=SEK): failed to open stream: no suitable wrapper could be found in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 15

 

Warning: implode(): Bad arguments. in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 19

 

Warning: file(): URL file-access is disabled in the server configuration in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 29

 

Warning: file(http://www.xe.net/ucc/convert.cgi?Amount=1&From=SEK&To=USD): failed to open stream: no suitable wrapper could be found in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 29

 

Warning: implode(): Bad arguments. in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 33

 

Warning: file(): URL file-access is disabled in the server configuration in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 15

 

Warning: file(http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=EUR&format=CSV&dest=Get+Table&sel_list=SEK): failed to open stream: no suitable wrapper could be found in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 15

 

Warning: implode(): Bad arguments. in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 19

 

Warning: file(): URL file-access is disabled in the server configuration in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 29

 

Warning: file(http://www.xe.net/ucc/convert.cgi?Amount=1&From=SEK&To=EUR): failed to open stream: no suitable wrapper could be found in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 29

 

Warning: implode(): Bad arguments. in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 33

 

Warning: file(): URL file-access is disabled in the server configuration in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 15

 

Warning: file(http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=SEK&format=CSV&dest=Get+Table&sel_list=SEK): failed to open stream: no suitable wrapper could be found in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 15

 

Warning: implode(): Bad arguments. in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 19

 

Warning: file(): URL file-access is disabled in the server configuration in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 29

 

Warning: file(http://www.xe.net/ucc/convert.cgi?Amount=1&From=SEK&To=SEK): failed to open stream: no suitable wrapper could be found in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 29

 

Warning: implode(): Bad arguments. in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php on line 33

 

Warning: Cannot modify header information - headers already sent by (output started at /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/localization.php:15) in /customers/domain.se/domain.se/httpd.www/catalog/admin/includes/functions/general.php on line 18

Then this

Warning: The primary exchange rate server (oanda) failed for US Dollar (USD) - trying the secondary exchange rate server.

Error: The exchange rate for US Dollar (USD) was not updated via xe. Is it a valid currency code?

Warning: The primary exchange rate server (oanda) failed for Euro (EUR) - trying the secondary exchange rate server.

Error: The exchange rate for Euro (EUR) was not updated via xe. Is it a valid currency code?

Warning: The primary exchange rate server (oanda) failed for Svenska Kr (SEK) - trying the secondary exchange rate server.

Error: The exchange rate for Svenska Kr (SEK) was not updated via xe. Is it a valid currency code?

 

need to solve this soon since im gonna be up and running in a week. And currencys are important to have updated, and doing it manually might be a problem to remember.

It will probably be a new day tomorrow.

Link to comment
Share on other sites

Or maybe someone allready knows whats the problem just by looking at my code?

<?php

/*

  $Id: localization.php,v 1.12 2003/06/25 20:36:48 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  function quote_oanda_currency($code, $base = DEFAULT_CURRENCY) {

  ini_set("allow_url_fopen","1");

    $page = file('http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=' . $code .  '&format=CSV&dest=Get+Table&sel_list=' . $base);

 

    $match = array();

 

    preg_match('/(.+),(\w{3}),([0-9.]+),([0-9.]+)/i', implode('', $page), $match);

 

    if (sizeof($match) > 0) {

      return $match[3];

    } else {

      return false;

    }

  }

 

  function quote_xe_currency($to, $from = DEFAULT_CURRENCY) {

    $page = file('http://www.xe.net/ucc/convert.cgi?Amount=1&From=' . $from . '&To=' . $to);

 

    $match = array();

 

    preg_match('/[0-9.]+\s*' . $from . '\s*=\s*([0-9.]+)\s*' . $to . '/', implode('', $page), $match);

 

    if (sizeof($match) > 0) {

      return $match[1];

    } else {

      return false;

    }

  }

?>

It will probably be a new day tomorrow.

Link to comment
Share on other sites

what have you changed in the default code? each and every installation i have works great with the update currency. to get back to a starting point please backup your code and then place unmodified code and see what happens. if it starts working, then replace each program with yours and when it breaks, you have the program causing the problem.

Link to comment
Share on other sites

The thing is, i havent changed anything.

This is how it came out of the box, i tried at once and it didnt work.

Then i just added the swedish currency cuz thats what i want to work with as primary currency.

 

So i havent changed a thing.

But i guess from your answer that my localization.php doesnt look right?

It will probably be a new day tomorrow.

Link to comment
Share on other sites

Ok . dowloaded a fresh localizations.php

and only thing i see is diferent is this

 

function quote_oanda_currency($code, $base = DEFAULT_CURRENCY) {

ini_set("allow_url_fopen","1");

$page = file('http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=' . $code . '&format=CSV&dest=Get+Table&sel_list=' . $base);

 

The part in bald red is what i have on my server, but its not in the fresh one i just unzipped. Dont know what it does or menas.

Have not changed the code myself, unless it was changed after i added swedish currency.

 

EDIT:

I uploaded the fresh one but it still didnt make any difference.

 

Any one have any ideas?

 

//Peter

It will probably be a new day tomorrow.

Link to comment
Share on other sites

Ok . dowloaded a fresh localizations.php

and only thing i see is diferent is this

 

function quote_oanda_currency($code, $base = DEFAULT_CURRENCY) {

ini_set("allow_url_fopen","1"); 

$page = file('http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=' . $code .  '&format=CSV&dest=Get+Table&sel_list=' . $base);

 

The part in bald red is what i have on my server, but its not in the fresh one i just unzipped. Dont know what it does or menas.

Have not changed the code myself, unless it was changed after i added swedish currency.

 

EDIT:

I uploaded the fresh one but it still didnt make any difference.

 

Any one have any ideas?

 

//Peter

 

I just had the same problem occur. Make sure that the currency you want as the default is set to the default. When you create one and select it as the default that setting doesn't stay properly. Just go edit your currency again, select it as the default, and update.

Link to comment
Share on other sites

Tried that now, just dont seem to work for me, still the same error messages.

What is it that actually happens when you click update?

A request goes to oanda to recalculate the currency rate between the default to the others, and then it will write it to the file localizations.php?

Have i understod that right? If thats how it works, what parts is it that might not work?

It will probably be a new day tomorrow.

Link to comment
Share on other sites

  • 2 months later...
Tried that now, just dont seem to work for me, still the same error messages.

What is it that actually happens when you click update?

A request goes to oanda to recalculate the currency rate between the default to the others, and then it will write it to the file localizations.php?

Have i understod that right? If thats how it works, what parts is it that might not work?

 

Ever get this working? I am having the same problem right now on an update I am working on that is on a different server than my live store.

 

The one it isn't working on, is running OpenBSD. There have already been a couple quirks with OpenBSD and OSCommerce so far.

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...