コード例 #1
0
         $order_create = $create->createOrder($quote_id);
         $quote_id = 0;
         echo $data[1] . ",createOrder,{$i},{$quote_id}," . $order_create . "<br>";
         //die;
         $out = "order successfully {$order_create} \n";
         //$out = "$out\n";
         fwrite($handlew, $out);
         Mage::unregister('shipping_cost');
     }
 }
 //fputcsv($handle, "aaa");
 $out = implode(",", $data);
 //createquote
 $csv_order_no = $data[27];
 Mage::log('final quote- before', NULL, 'mohanorder.log');
 $result = $create->createQuote($data);
 Mage::log('final quote-' . $result[0] . ',' . $result[1], NULL, 'mohanorder.log');
 //$create->createQuote($data);
 //echo $result; die;
 if ($result[0] == 1) {
     echo $data[1] . "," . $result[2] . "<br>";
     $quote_id = $result[2];
     $out = "{$out},success\n";
     fwrite($handlew, $out);
     //echo $data[1].",createquote,$i<br>";
 } else {
     echo "updatecsvfile" . $result[1] . "<br>";
     $out = "{$out}," . $result[1];
     $out = "{$out}\n";
     fwrite($handlew, $out);
     //echo $result[1]; die;