Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top