Revision 963029e4
Von Tamino Steinert vor 6 Tagen hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
896 | 896 |
foreach my $variant_property (@{$part->variant_properties}) { |
897 | 897 |
my $key = 'variant_property_' . $variant_property->id; |
898 | 898 |
$sort_keys{$key} = sub { |
899 |
$_[0]->get_variant_property_value_by_unique_name($variant_property->unique_name)->value;
|
|
899 |
$_[0]->get_variant_property_value_by_unique_name($variant_property->unique_name)->sortkey;
|
|
900 | 900 |
} |
901 | 901 |
} |
902 | 902 |
|
... | ... | |
909 | 909 |
@{$::form->{variants}}; |
910 | 910 |
|
911 | 911 |
my @to_sort = map { { old_pos => $variant_id_to_position{$_->id}, order_by => $method->($_) } } @items; |
912 |
if ($::form->{order_by} =~ /^(sellprice|lastcost)$/) { |
|
912 |
if ($::form->{order_by} =~ /^(sellprice|lastcost)$/ || |
|
913 |
$::form->{order_by} =~ /^variant_property_/) { |
|
913 | 914 |
if ($::form->{sort_dir}) { |
914 | 915 |
@to_sort = sort { $a->{order_by} <=> $b->{order_by} } @to_sort; |
915 | 916 |
} else { |
Auch abrufbar als: Unified diff
Varianten: Sortieren nach Ausprägungen Reihnefolge dieser verwenden