Results 1 to 5 of 5

Currency Problems

This is a discussion on Currency Problems within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; My clients stores are in Australian Dollars I have AUD set as the default currency but whenever I am adding ...

      
  1. #1
    Member
    Join Date
    Jun 2008
    Posts
    73
    Rep Power
    4


    Default Currency Problems

    My clients stores are in Australian Dollars

    I have AUD set as the default currency but whenever I am adding anything to do with currency, example + attributes it does it in USD

    How can I change this?

    Its so annoying to try and work out the equivalent in AUD only to find that when I update the exchange rate it all changes again.

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Currency Problems

    The LANGUAGE is defaulted to USD....

    in your /catalog/includes/language/english.php file:
    PHP Code:
    // 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'); 
    Change to:
    PHP Code:
    // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)
    define('LANGUAGE_CURRENCY''AUD'); 
    At the same time in the same file you might want to set the time/calender to AU....

    en_US.ISO_8859-1
    to
    en_AU.ISO_8859-1

    As well as change the FLAG too...
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    Lurker
    Join Date
    Sep 2008
    Posts
    2
    Rep Power
    0


    Default Re: Currency Problems

    I can't seem to change the time on my site, is this because even though I am based in Australia my server is in the US?

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Currency Problems

    I believe the reason why is because the host is using the mysql now() function to put the date into the database. Naturally, it uses the date of the host - the country it is in. To get around this problem you need to do these steps:

    Change the following code below in both of english.php found in the Catalog and Admin sections.

    Look for:
    PHP Code:
    @setlocale(LC_TIME'en_US.ISO_8859-1'); 
    Change the setlocale en_AU to the country you are in, you are in Australia so use the the code below.

    Change to:
    PHP Code:
    @setlocale(LC_TIME'en_AU.ISO_8859-1'); 
    Hopefully that is all you have to do...



    Now if that does not work try the following:
    PHP Code:
    putenv("TZ=Australia/Sydney"); // or whatever your area is.
    @setlocale(LC_TIME'en_AU.ISO_8859-1');
    $local_date_time date("Y-m-d H:i:s"); 
    Next look for the code below in checkout_process.php at line approx 106
    PHP Code:
    'date_purchased' => 'now()'
    change to:
    PHP Code:
    'date_purchased' => $local_date_time
    and at aprox line 127
    PHP Code:
    'date_added' => 'now()'
    change to:
    PHP Code:
    'date_added' => $local_date_time
    Next you have to go to catalog/admin/orders.php, found under the Admin directory and change this code. At around line 43. Replace now() with '".$local_date_time."'
    PHP Code:
            if ( ($check_status['orders_status'] != $status) || $comments != '' || ($status ==DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE) ) {
              
    tep_db_query("update " TABLE_ORDERS " set orders_status = '" tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID "'"); 
    to this

    PHP Code:
            if ( ($check_status['orders_status'] != $status) || $comments != '' || ($status ==DOWNLOADS_ORDERS_STATUS_UPDATED_VALUE) ) {
              
    tep_db_query("update " TABLE_ORDERS " set orders_status = '" tep_db_input($status) . "', last_modified = $local_date_time where orders_id = '" . (int)$oID "'"); 

    That should do it.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    Lurker
    Join Date
    Sep 2008
    Posts
    2
    Rep Power
    0


    Default Re: Currency Problems

    Thankyou so much, I had to do all the changes but it worked brilliantly

Similar Threads

  1. Currency Updater
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-29-2007, 08:00 AM
  2. Currency xchange OSC -> 2CO - Need Help
    By syahmohamed in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 05-14-2006, 06:09 PM
  3. GBP currency
    By limpduck in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 09-08-2005, 10:20 AM
  4. Custom Currency
    By cdhough in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 07-09-2004, 11:39 AM
  5. currency won't update??
    By gellnsh in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 09-18-2003, 01:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •