Added banned FCPs to preordercampaign
This commit is contained in:
@@ -23,7 +23,7 @@ $log = mfLoghandler::singleton();
|
||||
|
||||
$input = fopen($filename, "r");
|
||||
|
||||
echo "order_id;cam_id;rml_order_code\n";
|
||||
echo "order_id;cam_id;rml_order_code;rml_status\n";
|
||||
|
||||
$l = 0;
|
||||
while($csv = fgetcsv($input, 0, ";")) {
|
||||
@@ -38,7 +38,7 @@ while($csv = fgetcsv($input, 0, ";")) {
|
||||
$ext_cam_id = $db->escape($csv[1]);
|
||||
$ucode = "";
|
||||
|
||||
$res = $db->select("Preorder", "*", "addon_data LIKE '%$ext_order_id%' AND (deleted = 0 OR deleted IS NULL)");
|
||||
$res = $db->select("Preorder", "*", "addon_data LIKE '%$ext_order_id%'");
|
||||
if(!$db->num_rows($res)) {
|
||||
file_put_contents("php://stderr", "!!! No order found for $ext_order_id\n");
|
||||
} elseif($db->num_rows($res) > 1) {
|
||||
@@ -47,7 +47,11 @@ while($csv = fgetcsv($input, 0, ";")) {
|
||||
$order = $db->fetch_object($res);
|
||||
$ucode = $order->ucode;
|
||||
}
|
||||
$status = "";
|
||||
if($order->deleted) {
|
||||
$status = "canceled";
|
||||
}
|
||||
|
||||
echo "$ext_order_id;$ext_cam_id;$ucode\n";
|
||||
echo "$ext_order_id;$ext_cam_id;$ucode;$status\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user