pmaonline Posted May 6, 2006 Posted May 6, 2006 Hi i'm trying to : each time a costumer makes an order, it is saved to a csv file to server,i inserted this code in checkout sucess : $day=date('d'); $month=date('m'); $year=date('Y'); $hour=date('h'); $minute=date('i'); $second=date('s'); $filename ="c_" . $year.''. $month.''. $day.'_'. $hour.'_'. $minute.'_'. $second .".csv"; $myFile= fopen($filename,'a'); if(! $myFile){ print ("File could not be opened."); exit; } $csv_output.="teste".";"; $csv_output.="\n"; fputs($myFile, $csv_output); // Write the data ($string) to the text file but i don't know witch variables should i insert. Thanks for help
pmaonline Posted May 7, 2006 Author Posted May 7, 2006 please someone help me on this i can pay for this
Guest Posted May 7, 2006 Posted May 7, 2006 Hi i'm trying to : each time a costumer makes an order, it is saved to a csv file to server,i inserted this code in checkout sucess : $day=date('d'); $month=date('m'); $year=date('Y'); $hour=date('h'); $minute=date('i'); $second=date('s'); $filename ="c_" . $year.''. $month.''. $day.'_'. $hour.'_'. $minute.'_'. $second .".csv"; $myFile= fopen($filename,'a'); if(! $myFile){ print ("File could not be opened."); exit; } $csv_output.="teste".";"; $csv_output.="\n"; fputs($myFile, $csv_output); // Write the data ($string) to the text file but i don't know witch variables should i insert. Thanks for help $email_order in checkout_process.php seems to have all the order and customer data already gathered up for you. I use it for a custom order printing routine. I dunno if checkout_process.php is called too early in the process for you. If so, you could at least look at how the $email_order variable is built there and perhaps replicate that process in checkout_success.php.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.