Name

MV_COUNTRY_FIELD — name of form field whose value will be used as key to perform lookup in the MV_COUNTRY_TABLE

SYNOPSIS

{ field... }

DESCRIPTION

Form field whose value will be used as the key to perform lookup in the MV_COUNTRY_TABLE database.

VARIABLE TYPE

Catalog variable

EXAMPLES

Example:

Put the following in catalog.cfg:

Variable MV_COUNTRY_FIELD  country

NOTES

AVAILABILITY

MV_COUNTRY_FIELD is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Order.pm
Line 466 (context shows lines 456-470 in guess_cc_type():462)

  guess_cc_type($cardinfo->{MV_CREDIT_CARD_NUMBER});

return Vend::Interpolate::tag_attr_list($template, $cardinfo);
}


sub guess_cc_type {
my ($ccnum) = @_;
$ccnum =~ s/\D+//g;

my $country = uc($::Values->{$::Variable->{MV_COUNTRY_FIELD} || 'country'} || '');

if(my $subname = $Vend::Cfg->{SpecialSub}{guess_cc_type}) {
  my $sub = $Vend::Cfg->{Sub}{$subname} || $Global::GlobalSub->{$subname};
  my $guess;

Source: lib/Vend/Order.pm
Line 1212 (context shows lines 1202-1216 in _get_cval():1210)

}
else {
  return (undef, $var,
    errmsg( $state_error{CA}, $val )
  );
}
}

sub _get_cval {
my ($ref, $var) = @_;
my $cfield = $::Variable->{MV_COUNTRY_FIELD} || 'country';
my $cval = $ref->{$cfield} || $::Values->{$cfield};

if($var =~ /^b_/ and $ref->{"b_$cfield"} || $::Values->{"b_$cfield"}) {
  $cval = $ref->{"b_$cfield"} || $::Values->{"b_$cfield"};

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!