To create a support ticket, start a search

Fetching a CSV file on a distant URL to run on a CRON task


The CSV import file used to update your products via a CRON task is located on a distant URL.

Below is the data you will need to add to the CRON php configuration file to apply the process.

First of all, you need to set up the configuration file on your server. Refer to this article for the detailed procedure.

To then fetch the CSV file on a distant URL, add the following lines to the php configuration file, from the 2nd line:


$data = file_get_contents('http://addressOfTheFile');
file_put_contents('../../import/votreFichierCSV.csv',$data);
unset($data);

 

The name of your local CSV file will need to be the one indicated in this setting:

$_GET['filename'] = 'file_to_import.csv'; 


Download our themed Guides to learn how to manage your shop at lightning speed with Store Commander.




Related articles