UPS_ORIGIN — (partly documented)
Interchange 5.9.0:
Source: code/UserTag/ups_query.tag
Line 24 (context shows lines 14-28)
sub {
my( $mode, $origin, $zip, $weight, $country, $opt) = @_;
$opt ||= {};
BEGIN {
eval {
require Business::UPS;
import Business::UPS;
};
};
$origin = $::Variable->{UPS_ORIGIN}
if ! $origin;
$country = $::Values->{$::Variable->{UPS_COUNTRY_FIELD}}
if ! $country;
$zip = $::Values->{$::Variable->{UPS_POSTCODE_FIELD}}
Source: lib/Vend/Ship/QueryUPS.pm
Line 54 (context shows lines 44-58 in calculate():41)
unless($Have_Business_UPS) {
do_error("Ship mode %s: Requires installation of Business::UPS", $mode);
}
$opt->{service} ||= $opt->{table};
if(! $opt->{service} and $extra =~ /^\w+$/) {
$opt->{service} = $extra;
}
$opt->{service} ||= $opt->{table} || $mode;
$opt->{origin} ||= $::Variable->{UPS_ORIGIN};
$opt->{country_field} ||= $::Variable->{UPS_COUNTRY_FIELD} || 'country';
$opt->{geo} ||= $::Variable->{UPS_POSTCODE_FIELD} || 'zip';
my $origin = $opt->{origin};