i think you may still have problems with the path?
i think you may still have problems with the path?
Many thanks for that tip. It was the problem!
My host told me to use:
'/home/virtual/domain.com/var/www/html/
Where I insert my domain where it is bold above. But I checked my ftp, and that wasn't the path I was getting, it was the following:
'/home/myusername/mainwebsite_html/'
Where I unser my usernamein the area marked as bold above. I've added the above, and the script works great.My host will now set up a Cron Job to run once a day.
How often has the rest of you set the cron job to execute the script? Should I ask to change it to happen more often than once a day? After all, the price in the other currencies is only a guide, and I have marked this clearly on our site!
Prices in a currency other than your store's default are only guides if you don't actually allow them to purchase with those currencies. If you do allow purchases with these currencies then they are the actual amount that they will pay, not guides.
This is why Zen Cart has an a currency conversion ratio. It's set high by default (5%), which can make your product prices uncompetitive. If you're not allowing purchases in these currencies or want to price more competitively, I would recommend reducing the conversion ratio and increasing the frequency of the CRON job.
There's very little processing penalty to this. I have a client running it every hour on the half hour.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
mine updates once a day and i adjusted the 5% LOWER
Hi,
Another possible reason for the cron job not working is that the cron command may have to reference php with an absolute path.
For example on my hosting server this command:
php /home/username/public_html/path/currency_update.php
gets passed to the interpreter so it appears to be working but then results in the script stopping when it tries to connect to the database with:
PHP Fatal error: Call to undefined function mysql_connect() in /home/username/public_html/path/currency_update.php on line 25
In fact the cron command needs to have the full path to php,
eg.
/usr/lib/php /home/username/public_html/path/currency_update.php
Embarrassingly I wasted ages discovering this as I have no experience with UNIX, but a question for those of you who do have UNIX server experience: is this thing about the full path common knowledge and totally obvious to all but the newly-born/senile? I ask because my hosting support did not spot this and I was wondering if they should have.
Regards
Steve
I have noticed that this mod uses the currency rate which is higher (Oanda.com) , I would like this mod to use to use XE.com as it's primary for updates, this is what the script is designed for.
How do I get only the XE.com currency update and use the Oanda.com only as a backup .
Does the script use the higher currency update if yes how can I change this.
I have the mod installed.
My host provider told me to use:
I have the Cron job set to run every 4 hours. Does anyone have a suggestion about this?Code:/usr/bin/php /home/(directory)/currency_update.php
Hi,
Is there another way to schedule the currency_update.php file to run, besides using cron jobs. My host wants $55 to set up the cron job. Apart from the money issue I'd prefer to keep control of my web site. Depending on others to make changes for me puts me at a disadvantage.
Do the currencies your site deals with actually change that frequently with a variance that's so drastic it requires real-time updating? Most of the time it's pretty safe to update it once a week manually, according to markets and your own needs.
And ... a hosting company that wants to charge $55 to set up a cron job ... is ripping you off. There are many hosting companies out there that let you do that yourself from within your hosting control panel for no extra charge. The Certified Hosts list at the top of this page shows a few such companies. If you are considering one of them, be sure to ask them about your specific question when doing your research before signing up.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hi Drbyte.
Normally once a week would be ok, but the world is in panic mode at the moment. The Australian dollar has dropped from 85c US to around 60c in the past month and its jumping all over the place. I can manually do it once a day, but the weekends I'm away from the office.
My host, is fairly cheap and reliable. Despite them trying to gouge me this time I'm pretty pleased with them. But having briefly researched cron jobs before hand it didn't seem right to charge $55 for what seems to be a simple matter.
Bookmarks