[tmp page_title]
[L]We need some more information![/L]
[/tmp]
__NOLEFT_TOP__
[scratch page_title]
[msg arg.0="[page ord/checkout]"]We need to have some fields entered to be able to process your order. Please %sgo back and fill out the information.[/msg]
[L]Problem[/L]:
[perl]
my $msg = q{[subject]};
sub redo_message {
my($param,$word) = @_;
if($param =~ /mv_credit/) {
"
[L]You need to validate your credit card information.[/L]\n";
}
elsif ($word =~ /not_a_state/i) {
return "[L]We need a valid two-letter state code like CA.[/L]\n";
}
elsif ($word =~ /phone_day=/i) {
return "[L]Is that really a phone number?[/L]\n";
}
elsif ($word =~ /not_a_zip_code/i) {
return "[L]We need a zip code for UPS lookup.[/L]\n";
}
elsif ($word =~ /mv_contingent/) {
return "[L]You need to select your method of payment.[/L]\n";
}
else { return "$param: $word\n" }
}
@msg = split /\n/, $msg;
$msg = '';
for(@msg) {
($var, $val) = split /:\s*/, $_;
$msg .= redo_message($var, $val);
}
$msg .= '
';
$msg;
[/perl]
__NOLEFT_BOTTOM__