Page 20 of 30 FirstFirst ... 101819202122 ... LastLast
Results 191 to 200 of 298
  1. #191
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Currency Update (Automatic)

    Installed this mod today on both of my stores (in separate sub domains) and simply duplicated the file currency_update.php as store1_currency_update.php and store2_currency_update.php.

    Set up cron jobs as below, tested in cPanel and browser and it worked immediately without a glitch.

    Great mod, thank you indeed. Shame the ECB does not update the xml file more often, especially when the markets are volatile.

    This cron job has been suggested previously

    /usr/lib/php /home/username/public_html/path/currency_update.php
    My host requires

    /usr/local/bin/php /home/YOUR_USER_NAME/public_html/store1_currency_update.php
    and

    /usr/local/bin/php /home/YOUR_USER_NAME/public_html/store2_currency_update.php
    In the above command please note the space BETWEEN /usr/local/bin/php AND /home/YOUR_USER_NAME/public_html/store2_currency_update.php

    if you close that gap (ie no space) the whole thing falls over.

    Frank

  2. #192
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Currency Update (Automatic)

    This command should also work on a Linux server (not tested on my server though):

    or
    depening where your file is located

  3. #193
    Join Date
    Feb 2010
    Location
    Brisbane Australia
    Posts
    10
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    I still cant get it - i am sure i have the correct information but I must be just mixing it up? Anyone have any other suggestions?

  4. #194
    Join Date
    Feb 2010
    Location
    Brisbane Australia
    Posts
    10
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    I am still stuck with this.


    Currently I have the file like this:

    DEFINE ('/')

    //Get Zen Cart configuration data
    require_once('/home/dirtysic/public_html/imnaughty.net/currency_update.php/includes/configure.php');
    ('/home/dirtysic/public_html/imnaughty.net/currency_update.php/includes/database_tables.php');

    But it still comes up with this error:

    Warning: define() expects at least 2 parameters, 1 given in /home/dirtysic/public_html/imnaughty.net/currency_update.php on line 17

    Warning: require_once(home/dirtysic/public_html/imnaughty.net/includes/configure.php) [function.require-once]: failed to open stream: No such file or directory in /home/dirtysic/public_html/imnaughty.net/currency_update.php on line 20

    Fatal error: require_once() [function.require]: Failed opening required 'home/dirtysic/public_html/imnaughty.net/includes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dirtysic/public_html/imnaughty.net/currency_update.php on line 20





    Can anyone see what is wrong? If there is someone who knows how this works, I will pay to get this sorted as It is really taking too much of my time.

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

    Default Re: Currency Update (Automatic)

    We can't see your server paths from the outside, but my best guess would be that you should set the first line to

    PHP Code:
    DEFINE('PATH_TO_STORE_ROOT',''); 
    and set the next two back to

    PHP Code:
    // Get Zen Cart configuration data
    require_once(PATH_TO_STORE_ROOT 'includes/configure.php');
    require_once(
    PATH_TO_STORE_ROOT 'includes/database_tables.php'); 
    This is based on a reading of your warning and error messages that seem to suggest that you have placed the currency update file in your site's root folder
    Kuroi Web Design and Development | Twitter

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

  6. #196
    Join Date
    Feb 2010
    Location
    Brisbane Australia
    Posts
    10
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)



    Kuroi - you a legend, or possibly the zen God. It looks like that worked. I just used the original file that i downloaded intially. It looks like it worked and now just waiting for the cron job to go through.

    Can I ask one more thing?
    now that the file is changed back to the original do i still need to make the changes to the code at the bottom? As mentioned in other posts such as #169:

    $newrates = $newrates."\n".$currency['code']." ".$rate;

    if ($rate) {mysql_db_query(DB_DATABASE, "update " . TABLE_CURRENCIES . " set value = '" . $rate . "', last_updated = now() where currencies_id = '" . $currency['currencies_id']. "'", $link);}
    }
    }

    mysql_close($link);
    //end lookup

    $to = "[email protected]";
    $subject = "Currency Update";
    $thedate = getdate();
    $thedate = $thedate['hours'].":".$thedate['minutes'].".".$thedate['seconds']." ".$thedate['mday']."/".$thedate['mon']."/".$thedate['year'];
    $body = "mywebsite.com\n\ncurrency_update.php script has been run on ".$thedate."\nRate: ".$newrates;
    if (mail($to, $subject, $body)) {
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed...</p>");
    }




    OR does the standard file work?

    Mal

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

    Default Re: Currency Update (Automatic)

    Quote Originally Posted by imnaughty View Post
    now that the file is changed back to the original do i still need to make the changes to the code at the bottom? As mentioned in other posts such as #169:
    Those changes aren't part of this mod as such. They are a notification for the store owner that a change has occurred in the case where somebody triggers it manually by browsing to the file (CRON can usually be set to send an email in cases where the changes occur as planned).

    However, this is only relevant when the file has been installed below the web root (in your case public_html). The mod is designed such that the file can be placed outside the web root, in which case nobody without inside access to the server would be able to execute the script anyway.

    Even with it installed below the web root, I don't really see any risk. While I don't like the idea of a visitor being able to trigger a script on your site, in this case it would simply mean that they've improved the accuracy of your rates slightly before you do it yourself - so no real downside, i.e. I wouldn't bother with these additions.
    Kuroi Web Design and Development | Twitter

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

  8. #198
    Join Date
    Feb 2010
    Location
    Brisbane Australia
    Posts
    10
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    IT WORKED!

    Thank you Kuroi, all I had to do is use the default file and not make any changes to it. I put in the CRON job and it works. Thank you. Kuroi - sent you a PM

  9. #199
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Currency Update (Automatic)

    Quote Originally Posted by frank18 View Post
    This command should also work on a Linux server (not tested on my server though):

    wget http://yourdomain.com/currency_update.php
    Just set this up on my third store albeit on a different server to the other two and with newer version of cPanel.

    At first I placed the file into various locations, used this command to no avail

    /usr/local/bin/php /home/MY_ACCOUNT/public_html/FOLDER/currency_update.php
    then moved it to top level and used the command

    Result:

  10. #200
    Join Date
    Jan 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Currency Update (Automatic)

    I'm using this mod.

    I installed this months ago, and had a bit of trouble getting it work but I figured it out soon after.

    Randomly, a couple of days ago, I'm getting an error in the cron email:

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /nfs/c04/h02/blah/blahblah/data/currency_update.php on line 51

    Any ideas?

    Nothing changed to the code or anything...

 

 
Page 20 of 30 FirstFirst ... 101819202122 ... 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