Page 15 of 30 FirstFirst ... 5131415161725 ... LastLast
Results 141 to 150 of 298
  1. #141
    Join Date
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    Hi All,

    I have now tried changing the original file DEFINE('PATH_TO_STORE_ROOT','shop/'); to what Andrew Berezin suggested as per below,
    Quote Originally Posted by a_berezin View Post
    chdir(dirname(__FILE__));
    DEFINE('PATH_TO_STORE_ROOT', dirname(__FILE__) . '/');
    The result now is upon calling the url http://www.adulttoys4u.com.au/shop/currency_update.php that I get a complete blank page and no errors...at all....So is this what is supposed to happen? I am not sure as there was no confirmation of anything, I run it and then then I run it again from the CP and I got different exchange rates but only by a few cents I am thinking thats because it updated from OANDA in the CP and from here http://www.ecb.europa.eu when called by the url..
    Sooo Does it mean that If I go ahead and set the next stage IE the cron job now the currencies will be auto updated...

    Cheers
    Nearly there, Thanks KES99 I did get your PM hold that thought I think we are happening...

  2. #142
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Currency Update (Automatic)

    The file outputs nothing. This is deliberate, since it's designed to be run quietly and automatically as a script, not as a web page. So there would be nowhere in normal operation for any output to go.

    The way I test it personally, is to tweak the currency rates in the database and then run it in a browser as you have and look in the database to see if they're changed. Then change them again and setup a CRON job for a few seconds into the future and look to see if they've changed. If those work then I set the CRON job to daily shortly after the official update time and check the results the next day.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #143
    Join Date
    Jun 2006
    Posts
    440
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    Yeahiii that's fixed it and it all works just fine, (thanks for the code Andrew Berezin, I tested it like you suggested Kuroi and thanks to Kes 99 for your efforts.

    PS Kuroi what is the GMT of the official currency update time.

    Thanks

    Regards
    RR

  4. #144
    Join Date
    Mar 2009
    Posts
    40
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)


    I am so sad. This is a great bit of code, but for the longest time I was getting a "Division by Zero" error when it would run, and the site would set everything to zero (except for the default currency) when i tried to update. What was the problem?

    Well, I finally figured it out. The problem is that I am in South Korea, and the default currency is Won.

    The ECB doesn't include the Korean Won in it's XML datafeed - even though they have it right there on the website.

    I spent SOOOOOOOOO long trying to get this to work. But I think I'm SOL unless the ECB changes it's data feed. In the meantime, I will try installing 2.0



    Wish me luck!

  5. #145
    Join Date
    Mar 2009
    Posts
    40
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    Sorry, I'm an idiot.

    Living in Korea, you'd think I would know that the Won is KRW, not WON.

    I got spoiled by Google currency converter allowing me to type WON.

    Everything is working like a million bucks with 3.1!



    Quote Originally Posted by buddhaflow View Post

    I am so sad. This is a great bit of code, but for the longest time I was getting a "Division by Zero" error when it would run, and the site would set everything to zero (except for the default currency) when i tried to update. What was the problem?

    Well, I finally figured it out. The problem is that I am in South Korea, and the default currency is Won.

    The ECB doesn't include the Korean Won in it's XML datafeed - even though they have it right there on the website.

    I spent SOOOOOOOOO long trying to get this to work. But I think I'm SOL unless the ECB changes it's data feed. In the meantime, I will try installing 2.0



    Wish me luck!

  6. #146
    Join Date
    Mar 2009
    Posts
    40
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    OK, still . Haha. My host is not being a lot of help.

    When I execute the script from a browser, it works fine.

    When I execute through cron -

    /home6/blahblah/public_html/currency_update.php: line 1: ?php: No such file or directory
    /home6/blahblah/public_html/currency_update.php: line 2: /1,: Permission denied
    /home6/blahblah/public_html/currency_update.php: line 3: access-logs: command not found
    /home6/blahblah/public_html/currency_update.php: line 4: syntax error near unexpected token `('
    /home6/blahblah/public_html/currency_update.php: line 4: ` * Originally by Richard Fink (masterblaster) based on Zen Cart manual currency update'

    Whatever could be the problem? It doesn't seem to be interpreting as PHP at all. Any advice is greatly appreciated...

    Thank you,
    Sasha

  7. #147
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Currency Update (Automatic)

    Quote Originally Posted by buddhaflow View Post
    OK, still . Haha. My host is not being a lot of help.

    When I execute the script from a browser, it works fine.

    When I execute through cron -

    /home6/blahblah/public_html/currency_update.php: line 1: ?php: No such file or directory
    That sounds as though the CROM job is losing the opening "<" that forms part of the opening <?php tag. Thiough I'm sorry but I have no idea why it might do that.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #148
    Join Date
    Mar 2009
    Posts
    40
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    I'm not sophisticated enough to know why, but for some reason PHP had to be given the path to the PHP interpreter. Simply putting in:

    #!/usr/local/bin/php -q

    as the first line of the .php file cleared it right up :)

  9. #149

    Default Re: Currency Update (Automatic)

    Hi, there

    I have used this script in my crob job: /usr/bin/curl /***/***/public_html/includes/currency_update_curled.php

    But the return in email is: curl: (3) <url> malformed

    What's wrong and how to deal with?

    Any help would be highly appreciated.

    All the best,

  10. #150

    Default Re: Currency Update (Automatic)

    Hi, there

    After 2 support ticket with bluehost, I got it done.

    They use '/ramdisk/bin/php5 /home/...' as you input into the command to perform in cron job standard area.

    All the best,

 

 
Page 15 of 30 FirstFirst ... 5131415161725 ... LastLast

Similar Threads

  1. Automatic Currency Updates - curl version problem
    By mtimber in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Dec 2008, 07:53 PM
  2. Automatic Currency Selection for a domain
    By [email protected] in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 5 Jun 2007, 09:38 AM
  3. Automatic Currency Updates
    By dustyservers in forum Customization from the Admin
    Replies: 6
    Last Post: 28 Jun 2006, 12:38 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR