Revision 05fe6e61
Von Tamino Steinert vor 10 Monaten hinzugefügt
scripts/import_variant_csv.pl | ||
---|---|---|
44 | 44 |
my ( |
45 | 45 |
$opt_user, $opt_client, |
46 | 46 |
$opt_warengruppen_csv_file, $opt_farben_folder, |
47 |
$opt_part_csv_file, $opt_groessen_staffeln_csv_file |
|
47 |
$opt_part_csv_file, $opt_groessen_staffeln_csv_file, |
|
48 |
$opt_test_run, |
|
48 | 49 |
); |
49 | 50 |
our (%myconfig, $form, $user, $employee, $auth, $locale); |
50 | 51 |
|
... | ... | |
56 | 57 |
$opt_farben_folder = "kuw/Farben"; |
57 | 58 |
$opt_part_csv_file = "kuw/Export_bearbeitet.csv"; |
58 | 59 |
|
60 |
$opt_test_run = 1; |
|
59 | 61 |
|
60 | 62 |
$locale = Locale->new; |
61 | 63 |
$form = Form->new; |
... | ... | |
471 | 473 |
my @variant_properties = values %property_name_to_variant_property; |
472 | 474 |
$parent_variant->variant_properties(@variant_properties); |
473 | 475 |
|
474 |
next; # TODO: remove after testing |
|
476 |
next if ($opt_test_run); |
|
477 |
|
|
475 | 478 |
next if $count_errors_at_start != scalar @errors; |
476 | 479 |
$parent_variant->save(); |
477 | 480 |
|
... | ... | |
529 | 532 |
if (scalar @errors) { |
530 | 533 |
say join("\n", @errors); |
531 | 534 |
die join("\n", @errors); |
532 |
} else {
|
|
533 |
die "Keine Fehler"; # TODO: remove after testing
|
|
534 |
return 1;
|
|
535 |
} |
|
536 |
if ($opt_test_run) {
|
|
537 |
die "Test Durchlauf Erfolgereich: Keine Fehler in den Daten";
|
|
535 | 538 |
} |
536 | 539 |
}) or do { |
537 | 540 |
if (SL::DB->client->error) { |
Auch abrufbar als: Unified diff
kuw: CSV-Import-Script: Option für Testdurchlauf hinzugefügt