Automatic feed import for dummies
Hello everybody,
To update my website feeds I have to do the following manually:
1)I run from my browser window: http://www.*.*/feeds/autoimport.php
This automatically updates the *.xml files in my /feeds folder.
2) Now I log in to my PT 'admin home' section and click manually on all the 'import' words. This imports the feeds into my PT.
This takes quite a time, as I haven 20 shops.
18 of these shops import without problems.
Two of these shops DO import, however after about two minutes a pop-up window appears (mozilla firefox): 'you have chosen to open the following file: feeds_import.php
Then I can choose to open it/save it etc...
The products ARE imported, however the 'imported' (and 'products) column which contains the time/date stays empty. I do not know what causes this problem.
I cannot use a command line. (or I do not know how)
I called my provider and they told me I can use CRON, my provider had to execute this for me.
Finally my question:
Concerning all of the above (keeping in mind the two faulty feeds), what can I do to automate the process... I have read all the forum items about this subject, but I do need a step by step help.
Even if a CRON job is not possible, is it possible to automate the import process, so I do not have to click 20 times and wait for 20 minutes to import everything...
Thank you in advance for your answer.
Could someone go back to basics on this as Im new to price tapestry
Ive downloaded all my feeds as csv files (hope this doesn't affect any auto import I can run)
Could you start from scratch or point me somewhere that tells me how to update my feesd automcatically
regards
Hi,
There's lots of information in this thread...
http://www.pricetapestry.com/node/198
That should point you in the right direction - just let me know if you have any more questions or need help setting it all up...
Cheers,
David.
Hi David,
Your plan works... I have put both codes in one file and this updates my feeds automatically.
Some feeds however do trigger the 'download dialoge box'. I do not know how to solve this.
I want to call my host to automatically run the importall.php file.
Will this 'dialoge box' give any problems when running this file from my host provider? I do not want to annoy them with faulty feeds...
Brgds,
Al
Hello Al,
The dialog box is a result of your web server timing out on the response from PHP. If your host is able to run the script from PHP directly (i.e. the command line) this will not be an issue.
Cheers,
David.
Hello Al,
Some users have found that a skeleton script to run the command line import.php works well; but you may still then get the download dialog box which is indicative of a timeout problem, however the solution here generates continuous output so this may not be a problem.
To try this, create a new file in your /feeds/ folder (for convenience as this is where you have your autoimport.php script called importall.php containing the following code:
<?phpheader("Content-Type: text/plain");
passthru("php ../scripts/import.php @MODIFIED");
?>
This should import all feeds modified by your autoimport.php script which you would need to run first as the @MODIFIED parameter just imports feeds that have been updated since the last import. If this works, you could perhaps just add the above code to the end of your autoimport.php script...
Cheers,
David.