Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Datse

Archived
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Real Name
    Xaver

Datse's Achievements

  1. Hmmm, I was actually hoping it would be a problem with STS, since I couldn't find anything elsewhere in the forums. Loosing the session ID at some point seems to be a common problem though. Unfortunately I do not really know anything about php etc ... I am on a shared server and everything seemed to be fine while installing and setting up the shop. Then I moved the shop from the catalog dir to the root to make it available. Now I have these lost sessions and maybe more I have not discovered yet. Any idea where I should look? Would it maybe help to replace the two menus by another contribution? Thanks for your help!!! Datse
  2. No you're not! I have the same problem with both catmenu and manufacturers. I just wanted to ask if there is a solution? I couldn't find anything ... Datse
  3. I guess I didn't made it clear: The contrib can not be adjusted from within the admin - it would be great if that would be the case. For my part the currency seems to be working after the above changes.
  4. The above code didn't do the job, but after playing around I ended up with following coe that seems to do exactly what I wanted: starting with Euro and giving prices in USD and GBP It would be great if one could change the base currency in admin -- but that is beyond my understanding ... :blink: $exchrate[EUR] = 1.00; foreach ($stuff as $line) { ereg("currency='([[:alpha:]]+)'",$line,$gota); if (ereg("rate='([[:graph:]]+)'",$line,$gotb)) { $exchrate[$gota[1]] = $gotb[1]; } } $GBP_EUR= round($exchrate[GBP] / 1, 8); $USD_EUR = round($exchrate[USD] / 1, 8); tep_db_query("update currencies set value = ". $GBP_EUR ." where code = 'GBP'"); tep_db_query("update currencies set value = ". $USD_EUR ." where code = 'USD'");
  5. The following code is supposed to solve the problem of Euro as base currency (if so all credits go to wagen): If you use EUR as your default currency, please change the code as ********************************* $exchrate[EUR] = 1.00; foreach ($stuff as $line) { ereg("currency='([[:alpha:]]+)'",$line,$gota); if (ereg("rate='([[:graph:]]+)'",$line,$gotb)) { $exchrate[$gota[1]] = $gotb[1]; } } $EUR_GBP= round(1 / $exchrate[GBP], 8); $EUR_USD = round(1 / $exchrate[USD], 8); tep_db_query("update currencies set value = ". $EUR_GBP ." where code = GBP"); tep_db_query("update currencies set value = ". $EUR_USD ." where code = 'USD'"); **********************************
  6. Searching the forums I couldn't find any post dealing with this contribution: http://addons.oscommerce.com/info/5685%20" target="_blank"> http://addons.oscommerce.com/info/5685 This contrib seems ideal to get rid of complicated scripts to auto update currencies. It seems to work well but, I think has Pound as a base rate. I need to use Euro as the standard currency, but would like to be able to show customers from England or the US prices in Dollar or Pound. Any hint or even step-by-step explanation how to define what's getting updated would be highly appreciated Datse Here is the code: ********************************** // Update Currency Rate # Read currency exchanges rates # Cache file if appropriate ... if (time()-filemtime("eurofxref-daily.xml") > 36000) { $stuff = file("http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml"); $fh = fopen("eurofxref-daily.xml","w"); foreach ($stuff as $line) { fputs($fh,$line); } fclose ($fh); $xld = "loaded afresh (and not cached)"; } else { # .. or read from cache $stuff = file("eurofxref-daily.xml"); $xld = "cached (and not loaded afresh)"; } # $xld may be used in your output to inform you user or admin # Extract exchange rates $exchrate[EUR] = 1.00; foreach ($stuff as $line) { ereg("currency='([[:alpha:]]+)'",$line,$gota); if (ereg("rate='([[:graph:]]+)'",$line,$gotb)) { $exchrate[$gota[1]] = $gotb[1]; } } $GBP_EUR = round(1 / $exchrate[GBP], 8); $GBP_USD = round($GBP_EUR * $exchrate[USD], 8); tep_db_query("update currencies set value = ". $GBP_EUR ." where code = 'EUR'"); tep_db_query("update currencies set value = ". $GBP_USD ." where code = 'USD'"); **********************************
×
×
  • Create New...