//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; } } else { if (empty($data[0]) && !empty($data[1])) { $out = implode(",", $data); //echo "$quote_id"; die; //update //$create->validatetionUpdateProduct($data,$quote_id); //$create->updateProduct($data,$quote_id); $update = $create->updateProduct($data, $quote_id, $csv_order_no); //Mage::log('update-'.$update,NULL,'mohanorder.log'); //echo $update[0].",".$update[1]; die; if ($update[0] == 0) { //Mage::log('update 0-'.$update[0],NULL,'mohanorder.log'); $quote = Mage::getModel("sales/quote")->load($quote_id); $quote->delete(); $quote_id = 0; echo "updatecsvfile" . $update[1] . "<br>"; $out = "{$out}," . $update[1]; $out = "{$out}\n"; fwrite($handlew, $out); } else { if ($update[0] == 1) { //Mage::log('update 1-'.$update[0],NULL,'mohanorder.log'); $out = "{$out}," . $update[1];
} else { echo "updatecsvfile" . $result[1] . "<br>"; $out = "{$out}," . $result[1]; $out = "{$out}\n"; fwrite($handlew, $out); $err_status = 1; //echo $result[1]; die; } } else { if (empty($data[0]) && !empty($data[1])) { $out = implode(",", $data); //echo "$quote_id"; die; //update //$create->validatetionUpdateProduct($data,$quote_id); //$create->updateProduct($data,$quote_id); $update = $create->updateProduct($data, $quote_id, $csv_order_no, $pincode, $pinvali); //Mage::log('update-'.$update,NULL,'mohanorder.log'); //echo $update[0].",".$update[1]; die; if ($update[0] == 0) { //Mage::log('update 0-'.$update[0],NULL,'mohanorder.log'); $quote = Mage::getModel("sales/quote")->load($quote_id); $quote->delete(); $quote_id = 0; echo "updatecsvfile" . $update[1] . "<br>"; $out = "{$out}," . $update[1]; $out = "{$out}\n"; fwrite($handlew, $out); $err_status = 1; } else { if ($update[0] == 1) { //Mage::log('update 1-'.$update[0],NULL,'mohanorder.log');