Revision a1e016b4
Von Tamino Steinert vor 9 Monaten hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
889 | 889 |
foreach my $variant_property (@{$part->variant_properties}) { |
890 | 890 |
my $key = 'variant_property_' . $variant_property->id; |
891 | 891 |
$sort_keys{$key} = sub { |
892 |
$_[0]->get_variant_property_value_by_unique_name($variant_property->unique_name)->value;
|
|
892 |
$_[0]->get_variant_property_value_by_unique_name($variant_property->unique_name)->sortkey;
|
|
893 | 893 |
} |
894 | 894 |
} |
895 | 895 |
|
... | ... | |
902 | 902 |
@{$::form->{variants}}; |
903 | 903 |
|
904 | 904 |
my @to_sort = map { { old_pos => $variant_id_to_position{$_->id}, order_by => $method->($_) } } @items; |
905 |
if ($::form->{order_by} =~ /^(sellprice|lastcost)$/) { |
|
905 |
if ($::form->{order_by} =~ /^(sellprice|lastcost)$/ || |
|
906 |
$::form->{order_by} =~ /^variant_property_/) { |
|
906 | 907 |
if ($::form->{sort_dir}) { |
907 | 908 |
@to_sort = sort { $a->{order_by} <=> $b->{order_by} } @to_sort; |
908 | 909 |
} else { |
Auch abrufbar als: Unified diff
Varianten: Sortieren nach Ausprägungen Reihnefolge dieser verwenden