tags:

views:

54

answers:

1

I am developing my first large Ubercart site, which needs to have a daily product database update from an existing xBase (DBF format). The conversion from DBF to MySQL/PHP is handled on the same server as the Drupal installation, using some custom scripting I have done, and works well. However, the next step is to get my script to talk to Drupal and update the product nodes with pricing/stock level/etc.

Googling hasn't resulted in any good hits, at least in PHP terms.

So how do I go about this? Can I just use a POST to a particular page in Drupal, ie RESTful, or do I have to use some more arcane xmlrpc method?

+1  A: 

There's a couple ways to approach this. If you need to de-couple your import system from php you could create a api that would allow you products to be updated from an authenticated data provider.

http://drupal.org/project/services

The simpler method though is if your working in php you should bootstrap drupal and insert / update the nodes from php:

Here's a great howto on doing that: hxxp://www.group42.ca/drupal_command_line_script_template

openist
Yes, I found the Services module an hour after this question...but the documentation is all over the place with relevance and versioning issues :S but your link helps too; just not sure whether it is best to bootstrap the entire drupal environment just to load the stock or go down the xmlrpc or REST route still... will try it all out.