Revision 46f3d367
Von Sven Schöling vor fast 2 Jahren hinzugefügt
SL/DB/Manager/PriceRuleItem.pm | ||
---|---|---|
85 | 85 |
# we only generate cvar types for cvar price_rules that are actually used to keep the query smaller |
86 | 86 |
# these are cached per request |
87 | 87 |
sub generate_cvar_types { |
88 |
my $cvar_configs = SL::DB::Manager::CustomVariableConfig->get_all; |
|
88 |
my @supported_cvar_modules = qw(CT Contacts IC Projects ShipTo); |
|
89 |
|
|
90 |
my $cvar_configs = SL::DB::Manager::CustomVariableConfig->get_all(query => [ module => \@supported_cvar_modules ]); |
|
89 | 91 |
|
90 | 92 |
my @types; |
91 | 93 |
|
... | ... | |
140 | 142 |
$_[0]->contact ? $_[0]->contact->cvar_by_name($config->name)->value : undef |
141 | 143 |
); |
142 | 144 |
}, |
145 |
ShipTo => sub { |
|
146 |
raw_value( |
|
147 |
$_[0]->custom_shipto ? $_[0]->custom_shipto->cvar_by_name($config->name)->value : |
|
148 |
$_[0]->shipto ? $_[0]->shipto->cvar_by_name($config->name)->value : undef |
|
149 |
); |
|
150 |
}, |
|
143 | 151 |
); |
144 | 152 |
|
145 | 153 |
my $data_type; |
Auch abrufbar als: Unified diff
PriceRule: Unterstützung für ShipTo CVars und Absicherung gegen unbekannte CVar Module
Die Existenz von RequirementSpecs CVars macht jetzt nicht mehr die
Preisregeln kaputt