Wiki

New Case Case Status
Log In

Wiki

 
Synchronising API Product Pric…
  • RSS Feed

Last modified on 12/8/2010 10:58 AM by User.

Tags:

Synchronising API Product Prices

Products added to your database via the 'API Search' feature will not have their prices kept in synch with the actual prices unless you run the supplied script named 'apirefresh.php' in the admin/bin folder of the installation.

It's probably easiest to create a shell wrapper script for this, i.e. named apirefresh.sh and place it in the same 'admin/bin' folder so you can automate this via cron.

In this apirefresh.sh file enter the following two lines :

 cd /path/to/your/ds/install/admin/bin
/path/to/php5 apirefresh.php 

Save the file with permissions 0755 - obviously changing the /path/to... bits with the correct path to your DS folder and PHP5 shell command respectively.

You can now use the full path to this file, e.g.

 /path/to/your/ds/install/admin/bin/apirefresh.sh 

as the command for the cron sheduler.

You probably want to schedule this command to run nightly, be aware though that each API product will result in a web service call to the affiliate network asking it for the updated price (and other details) so if you have several thousand products you might want to check that you will not hit any quota allowance that the affiliate network might have set.