Hi!
Is it possible to tell the script to fetch currencies the same way as the manual ZenCart update? (At least as backup)
As for now one of the currencies (isk) is coming out with 0,- and thats really bad business...![]()
Hi!
Is it possible to tell the script to fetch currencies the same way as the manual ZenCart update? (At least as backup)
As for now one of the currencies (isk) is coming out with 0,- and thats really bad business...![]()
Hi guys,
I keep on getting this message when it tries to do it's task
No input file specified.
Halloj.
Found that "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" are missing the value for isk. However, manual currency update from "xe" provide it.
-How should I change "Define currency file" to fetch from "xe" instead of "ecb"?
Or maby even better as an backup, same way manual curency update does?
Troll
Hi.
Since "ecb" doesent provide one of the currencies I'm interested in, (one of the worlds most instable that is) I assume it should'nt be to complicated to fetch currenciy from "oanda" and/or "xe" (or somewhere else) instead?
At least tell the update function NOT to set values to zero!
Could someone please be so kind and give a hint!?
Troll
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Thanks for answering kuroi!
Yes I have read something about that legal pov. But the built in update (localization.php as I understand) uses oanda / xe, and seem to work just fine... What's the difference? I reckon admin tools has to be as legal as some add-on!?...
-Zen Cart v.1.3.8 btw.
Just havent got the knowledge to combine the two scripts, as it seem to be the most obvious solution?...
As I said, isk in particular should be updated often! Actually with that currency this is a do or don't question...
Also seem to be a glitch that the "old" currency doesen't sustain when not fed with new values!?...
The difference is that the admin script was written in 2006, before the terms of use were changed. Earlier versions of the mod were based on that code. Though of course, I couldn't possibly suggest that you try using them instead.
I'm afraid that I don't understand your last paragraph.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Ok. thank's. Sorry to be slow...
Still don't understand the legal thingy though... -No one could be blamed for using old verions, I get that. But I don't understand that including an old script to a new version makes it legal?...
But then again, I don't catch much of all them laws anyway...
Now I have this other problem:
I can't upgrade the addon because of superstition and a bad knee..
Could you please guide me how to fix the convertion ratio issue?
Also tried to explain with rough English:
If the supplier -feeder- of currencies give no value for a certain currency, (today this is the case with ECB and ISK found here) then the currency should stay with the latest updated value, instead of update to a value of zero! Otherwhise all products are marked zero-price for that currency!
Thank's a lot!
Troll
FINALLY I got this up and running!
I have spent so many hours on this supposedly simple task!... So I thought I should post some SOLUTIONS to some of the issues I have struggled with. As always, answers are more or less obvious, and have been enlightened before…
With a possibility to be totally out sailing, this works for me (so far):
currency_update.php
The versions after 2006 are using “ecb” for feed. Earlier versions are using “oanda” and ”xe” as the manual update in your Admin.
The mod, consisting of a single file, could be placed anywhere, but has to be edited to work:
In the first line of script (about row 14-17) “DEFINE” You should set the path FROM the file to the root of your store.
E.g. If you put the file directly onto your store root, this should only be a slash “/”. If you put it in “includes” it should be “./” and so on. (Path upwards in hierarchy)
In the next two lines “require_once” I had to set the FULL path to the two files: “configure.php” and “database_tables.php”. On my server I have named my store root “shop”, and my path is roughly: “/home/t/troll/www/shop/includes/configure.php” and “/home/t/troll/www/shop/includes/database_tables.php”
Cron job
In your command shell write “crontab –l” to list your crontab, and “crontab –e” to edit it. To edit in “VI” use “i” to insert, and “Esc : w q” to write to file and quit VI.
Your crontab has to include the full path to your “currency_update.php” file.
In my case I also had to include full path to php command. My cron that runs for every 6’th hour look like this:
* 0-23/6 * * * /usr/local/bin/php /home/t/troll/www/shop/currency_update.php
(Beware of the space between the php command and the path to the currency_update.php file.)
The cron setup paremeters are:
.---------------- minute (0 - 59)
| .------------- hour (0 - 23)
| | .---------- day of month (1 - 31)
| | | .------- month (1 - 12) OR jan,feb,mar,apr ...
| | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
| | | | |
* * * * * command to be executed
For example, to run a cron job once a day at midnight set up: 0 0 * * * /path/to/php /path/to/file.php
To test your cron job you could set the job for a short interval. E.g. Setting it: 0-59/2 * * * * /path….
Will run the job every second minute. It’s then easy to check if your currency rate changing just by changing the “Currency Conversion Ratio” in your “Admin > Configuration > My Store”, and wait for two minutes. (Assuming that one works as it should…)
If you set the parameters wrong in your crontab, it should output a message when you save.
If you for example have got the paths wrong, and the job is NOT working properly, it outputs a mail with the error. (Just write “mail” in your command shell.)
Btw. You can check what services your host provides by simply making an “info.php” file, and add the code: <? phpinfo(); ?> into it. Then just open the “info.php” file in your browser.)
Hope this could be of some help for somebody!
Troll![]()
Bookmarks