Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 506698f8

Von Sven Schöling vor etwa 2 Jahren hinzugefügt

  • ID 506698f830c79269e31eb6803556dbfc4f2333d8
  • Vorgänger 85282f8c
  • Nachfolger 66ea4bb1

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

Unterschiede anzeigen:

SL/DB/Manager/PriceRuleItem.pm
# we only generate cvar types for cvar price_rules that are actually used to keep the query smaller
# these are cached per request
sub generate_cvar_types {
my $cvar_configs = SL::DB::Manager::CustomVariableConfig->get_all;
my @supported_cvar_modules = qw(CT Contacts IC Projects ShipTo);
my $cvar_configs = SL::DB::Manager::CustomVariableConfig->get_all(query => [ module => \@supported_cvar_modules ]);
my @types;
......
$_[0]->contact ? $_[0]->contact->cvar_by_name($config->name)->value : undef
);
},
ShipTo => sub {
raw_value(
$_[0]->custom_shipto ? $_[0]->custom_shipto->cvar_by_name($config->name)->value :
$_[0]->shipto ? $_[0]->shipto->cvar_by_name($config->name)->value : undef
);
},
);
my $data_type;

Auch abrufbar als: Unified diff