Forums / All Other Contributions/Addons / Currency Update (Automatic)

Currency Update (Automatic)

Views: 82,431

Results 21 to 40 of 298
4 Jun 2007, 4:56 PM
#21
cjjune avatar

cjjune

Zen Follower

Join Date:
Apr 2007
Posts:
139
Plugin Contributions:
0

Currency Update (Automatic)

:clap: I GOT IT!. The command I use is;-

php /home/[your username]/public_html/rss/import_feeds.php

8 Jun 2007, 5:30 AM
#22
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Currency Update (Automatic)

Hmmm this has always been working fine, but now I've moved to a new server and the script and cron are working except they update my currency rate to 0 which makes everything in my store free if visitors are shopping in US $, eek!!! I didn't change the file at all, I can't understand why it's doing that. Any thoughts anyone?

TIA!

Danielle

8 Jun 2007, 3:30 PM
#23
cjjune avatar

cjjune

Zen Follower

Join Date:
Apr 2007
Posts:
139
Plugin Contributions:
0

Re: Currency Update (Automatic)

Danielle:

Hmmm this has always been working fine, but now I've moved to a new server and the script and cron are working except they update my currency rate to 0 which makes everything in my store free if visitors are shopping in US $, eek!!! I didn't change the file at all, I can't understand why it's doing that. Any thoughts anyone?

TIA!

Why don't you Google the error message that comes out? The solution is somewhere out there in the WWW.

8 Jun 2007, 4:41 PM
#24
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Currency Update (Automatic)

There is no error message...everything appears to work great, but when I check the currency values in my admin, Canadian is correct and USD is changed to 0.

Danielle

8 Jun 2007, 7:08 PM
#25
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Currency Update (Automatic)

What happens when you do a manual update? How do you know that CRON and the script are working?

Kuroi Web Design and Development | Twitter

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

27 Jun 2007, 10:14 AM
#26
saher_alsous avatar

saher_alsous

New Zenner

Join Date:
Jun 2007
Location:
Palestine
Posts:
55
Plugin Contributions:
0

Re: Currency Update (Automatic)

well, what should i do here

i think i read all the posts here but i can't find one thing

in the mod they said that you should change line 16

is it this one? define('CURRENCY_SERVER_BACKUP', 'oanda');

i doubt it

but i thought that it would be this one

$location = '/home///currency_update.php'; // location of zen-cart intall

i put my physical address here

and in the cron job i put the physical address my host supervisor gave it to me...

but still nothing is working!!!???

did i made the right change inside the script?

can you advice in it?

saher

29 Jun 2007, 5:08 PM
#27
phreakymonkey avatar

phreakymonkey

New Zenner

Join Date:
Jun 2007
Posts:
20
Plugin Contributions:
0

Re: Currency Update (Automatic)

My host has allow_url_fopen disabled for security reasons, and I'm sort of loath to enable it since most of the advice I've found suggests leaving it alone unless you really know what you're doing. I know zilch about web security, so...

Several people have suggested using cURL as an alternative, but I don't know PHP from Hebrew and haven't figured out how to do it. Perhaps I'm revealing my ignorance here, but mightn't it be a good idea to make the switch in the next version of the script in the interest of maximum compatibility? It would at least eliminate one of the issues people are having. It's just these two lines that are causing problems, right?

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

$page = file('http://www.xe.net/ucc/convert.cgi?Amount=1&From=' . $from . '&To=' . $to);
1 Jul 2007, 2:25 PM
#28
phreakymonkey avatar

phreakymonkey

New Zenner

Join Date:
Jun 2007
Posts:
20
Plugin Contributions:
0

Re: Currency Update (Automatic)

I spent a bunch of time searching tutorials and other various websites, trying to figure out how to replace the php file() function with cURL. Then I found the admin/includes/functions/localization.php file, which seems to be what this is based on. I just cut and pasted that code into the currency_update.php file, and it seems to have just updated my currencies okay on my server with allow_url_fopen disabled. Here it is if anyone wants to poke at it. I'm certainly not going to put it up on the Downloads page until someone who is more knowledgeable about these things checks and makes sure nothing is going to explode.

Currency Update (cURLed)

1 Jul 2007, 8:40 PM
#29
masterblaster avatar

masterblaster

Totally Zenned

Join Date:
Aug 2004
Location:
Germany
Posts:
528
Plugin Contributions:
0

Re: Currency Update (Automatic)

Thank you kuroi and phreakymonkey for making those little changes to the script. I haven't given too much attention to it, since it should be working as a standalone script, regardless of the zen version.

Unfortunaly I didn't think of file() fopen() disallowed by a server when writing the script... The CURL method is the best alternative, which should work ok.

I will see if I can improve the script for now and make it available on my website by tomorrow.

25 Feb 2008, 6:17 PM
#30
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: Currency Update (Automatic)

Hi,
I seem to be having a little difficulty getting this mod set up.

Please can someone advise me if these settings are correct:

the currency_update.php file is in directory /home/admin*****
the run command is in directory /etc/cron.hourly/hourlytasks
my store is in directory /var/www/html

I have the setting in the currency_update.php file set to /var/www/html
the run command is set to usr/bin/php /home/admin*****/currency_update.php

This should run the script every hour but when I look in admin->localization->currencies the displayed last update date was days ago.

Please can someone tell me what I'm doing wrong?

Thanks

6 Mar 2008, 5:25 PM
#31
vitalwares avatar

vitalwares

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: Currency Update (Automatic)

Hi,

I am having some difficulty using this mod as well.

I have installed the update_currency.php in the root for now, then set up the path

$location = '/home/[my-username]/public_html/';

Then tried to execute like this

https://www.vitalwares.ca/currency_update.php

(I have not even set up a cron job yet)

There were no errors on screen so I assumed that the file has run currectly but I donot see any change in the price of an item in a different currency i have tested this over 2 days and there have definately been changes in the currency vlaues , and whn I maually update currency using admin the price of the items changes even if i do it as frequesntly as every 5 mins.

This leads me to assume that there is something wrong ? Please help..

p.s. My default currency is Canadian dollars could this be an issue ?

:lookaroun

6 Mar 2008, 6:00 PM
#32
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: Currency Update (Automatic)

Hi vitalwares,

I had a bit of trouble getting it set up but it's sorted now, I think the problem you are having is that the file currency_update.php is in your root directory, is this the same place that you have zen cart installed, if so I think your path should be:

$location = '/';

I'm not 100% sure if that is correct but give it a try and see what happens, you can tell if it works in your currencies page in admin the updated date will change to today (unless you've already updated it manually today)

6 Mar 2008, 7:26 PM
#33
vitalwares avatar

vitalwares

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: Currency Update (Automatic)

hi,

Now I am sure that there is something wrong.

Masterblaster/kuroi Please take a look at this modified file I have added some diagnostic code and run this file several times, It does return the currency rates but does not update them (it returns the same data 1 hr or 10 hrs later)

Please let me know if I have made a mistake or its the script that has an issue.

:smile:

6 Mar 2008, 7:29 PM
#34
vitalwares avatar

vitalwares

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: Currency Update (Automatic)

Phil020782:

Hi vitalwares,

I had a bit of trouble getting it set up but it's sorted now, I think the problem you are having is that the file currency_update.php is in your root directory, is this the same place that you have zen cart installed, if so I think your path should be:

$location = '/';

I'm not 100% sure if that is correct but give it a try and see what happens, you can tell if it works in your currencies page in admin the updated date will change to today (unless you've already updated it manually today)

Hi Phil,

Thanks for your help but if path was the issue it would have given an error response like:

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

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

9 Mar 2008, 7:18 PM
#35
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: Currency Update (Automatic)

vitalwares:

Hi Phil,

Thanks for your help but if path was the issue it would have given an error response like:

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

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

OK, well like I said I don't really know much about it, I had problems with the path and never got an error message

9 Mar 2008, 7:53 PM
#36
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: Currency Update (Automatic)

Hello all,

I use this modules a long time ago. But the trouble is it take my Host Cpu Resource too much. How to fix this trouble ?

Thanks you for let me know :D

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

10 Mar 2008, 7:07 PM
#37
vitalwares avatar

vitalwares

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: Currency Update (Automatic)

vitalwares:

hi,

Now I am sure that there is something wrong.

Masterblaster/kuroi Please take a look at this modified file I have added some diagnostic code and run this file several times, It does return the currency rates but does not update them (it returns the same data 1 hr or 10 hrs later)

Please let me know if I have made a mistake or its the script that has an issue.

:smile:

Hi somebody please help with this ? Kuroi ? Masterblaster ?

Its just not refreshing the numbers...

31 Mar 2008, 9:47 PM
#38
dayo avatar

dayo

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
1

Re: Currency Update (Automatic)

I will be posting an update to this shortly

17 Jul 2008, 4:11 PM
#39
angeli avatar

angeli

New Zenner

Join Date:
Aug 2007
Posts:
43
Plugin Contributions:
0

Re: Currency Update (Automatic)

phreakymonkey:

I spent a bunch of time searching tutorials and other various websites, trying to figure out how to replace the php file() function with cURL. Then I found the admin/includes/functions/localization.php file, which seems to be what this is based on. I just cut and pasted that code into the currency_update.php file, and it seems to have just updated my currencies okay on my server with allow_url_fopen disabled. Here it is if anyone wants to poke at it. I'm certainly not going to put it up on the Downloads page until someone who is more knowledgeable about these things checks and makes sure nothing is going to explode.

Currency Update (cURLed)

Phreakymonkey - you are my hero!!! :clap::clap::clap: I needed the CURL version as I was getting the following error: "URL file-access is disabled in the server configuration", pointing to the lines with the links. Anyone with the same problem - try phreakymonkey's version.

I'm not a good enough coder to vouch for the "safety" of your script, but it sure does work. Maybe add it to the downloads?

16 Aug 2008, 9:49 AM
#40
shocker avatar

shocker

Zen Follower

Join Date:
Jul 2007
Location:
Jakarta
Posts:
346
Plugin Contributions:
0

Re: Currency Update (Automatic)

Does anyone have experience with the Automatic Currency Updates ver. 2.0?

I want to install the mod but I'm weary.

What can expect? :lookaroun