sdancem Posted September 16, 2005 Share Posted September 16, 2005 Does anyone know if oscommerce is capable of exporting information in .csv files to my fulfillment center? Thanks. Link to comment Share on other sites More sharing options...
Kenja Posted September 21, 2005 Share Posted September 21, 2005 Stan, You'll probably have to write something yourself as I'm not aware of any implemented modules for doing that. If you want to do it yourself, you'll need to create a database query that pulls all the variables you want. Simply separate the variables within a row with '\t' and end each row with '\n' if you want a tab delimited file. If you want a comma delimited file, use ',' instead of '\t'. You can put all the information into one large string. Then, when you want to download it, use this function: if ($user_wants_to_download){ //******************************* // STREAM FILE //******************************* header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=Adresses.txt"); // Changed if using SSL, helps prevent program delay/timeout (add to backup.php also) // header("Pragma: no-cache"); if ($request_type== 'NONSSL'){ header("Pragma: no-cache"); } else { header("Pragma: "); } header("Expires: 0"); echo $file_contents; die(); } Hope that helps. Ken Link to comment Share on other sites More sharing options...
sdancem Posted September 21, 2005 Author Share Posted September 21, 2005 Stan, You'll probably have to write something yourself as I'm not aware of any implemented modules for doing that. If you want to do it yourself, you'll need to create a database query that pulls all the variables you want. Simply separate the variables within a row with '\t' and end each row with '\n' if you want a tab delimited file. If you want a comma delimited file, use ',' instead of '\t'. You can put all the information into one large string. Then, when you want to download it, use this function: if ($user_wants_to_download){ //******************************* // STREAM FILE //******************************* header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=Adresses.txt"); // Changed if using SSL, helps prevent program delay/timeout (add to backup.php also) // header("Pragma: no-cache"); if ($request_type== 'NONSSL'){ header("Pragma: no-cache"); } else { header("Pragma: "); } header("Expires: 0"); echo $file_contents; die(); } Hope that helps. Ken <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.