Revision 5a6615ed
Von Tamino Steinert vor 6 Tagen hinzugefügt
SL/DB/Part.pm | ||
---|---|---|
748 | 748 |
) . "]"; |
749 | 749 |
} |
750 | 750 |
|
751 |
sub variant_values_sortkey { |
|
752 |
my ($self) = @_; |
|
753 |
join('', |
|
754 |
map { (10000 + $_->variant_property->sortkey ) . (10000 + $_->sortkey) } |
|
755 |
sort { $a->variant_property->sortkey <=> $b->variant_property->sortkey } |
|
756 |
@{$self->variant_property_values} |
|
757 |
) |
|
758 |
}; |
|
759 |
|
|
751 | 760 |
sub variant_value { |
752 | 761 |
my ($self, $variant_property) = @_; |
753 | 762 |
die "only callable on parts of type parent_variant" unless $self->is_variant; |
Auch abrufbar als: Unified diff
Varianten: Helferfunktion zum Sortieren von Varianten eines Stammartikel