Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ad1e682f

Von Tamino Steinert vor 9 Monaten hinzugefügt

  • ID ad1e682f723378e84469d25a722548e59a8b2aa6
  • Vorgänger f8afe881
  • Nachfolger dd500963

kuw: CSV-Import-Script: Feinstrumpfhosen behandeln

Unterschiede anzeigen:

scripts/import_variant_csv.pl
171 171

  
172 172
  if ($part{warengruppe_nummer} eq '114310' || $part{warengruppe_nummer} eq '124310') {
173 173
    # gürtel
174
  } elsif ($part{warengruppe_nummer} eq '151010') {
175
    # Feinstrumpfhosen
176
    if ($part{varianten_groesse}) {
177
      $part{varianten_groesse} =~ s/^([IV]*) EW$/$1 ew/;
178
      $part{varianten_groesse} =~ s/^([IV]*) E$/$1 ew/;
179
      $part{varianten_groesse} =~ s/^([IV]*) e$/$1 ew/;
180
    }
174 181
  } elsif ($part{warengruppe_nummer} eq '114415') {
175 182
    # Hosenträger haben keine Größe
176 183
    delete $part{varianten_groesse};
......
413 420
        if ($property_name eq 'varianten_groesse') {
414 421
          @valid_variant_properties = @{$partsgroup_id_to_groessen_staffeln{$partsgroup->id}};
415 422
          unless (scalar @valid_variant_properties) {
416
            push @errors, "NO variant property for key '$property_name' and partsgroup '${\$partsgroup->partsgroup}'. values '@$needed_property_values' in part '$makemodel_model $description' in row " . $first_part->{csv_row};
423
            push @errors, "NO variant property for key '$property_name' and partsgroup '${\$partsgroup->description}'. values '@$needed_property_values' in part '$makemodel_model $description' in row " . $first_part->{csv_row};
417 424
            next;
418 425
          }
419 426
        } elsif ($property_name eq 'varianten_farbe') {
......
455 462
        if (scalar @{$best_match->{missing}}) {
456 463
          push @errors, "Could not find variant property with values for $property_name '@{$needed_property_values}' of part '$makemodel_model $description' in row " . $first_part->{csv_row} . "\n" .
457 464
          "Best match is '${\$best_match->{property}->name}' with missing values '@{$best_match->{missing}}'.\n" .
458
          "Valid properties are: " . join(', ', map {$_->name} @valid_variant_properties) . "\n"
465
          "Valid properties for partsgroup '${\$partsgroup->description}' are: " . join(', ', map {$_->name} @valid_variant_properties) . "\n"
459 466
          ;
460 467
          next;
461 468
        }

Auch abrufbar als: Unified diff