Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision de558fa6

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

  • ID de558fa6cb84aeedb47f882a10c0419f0af93f7c
  • Vorgänger 2191ef7f
  • Nachfolger 7d104877

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