[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] many warehouses shipping
>
> UserTag ship Order mode zip country
> UserTag ship Routine <<EOR
> sub {
> my( $mode, $zip, $country) = @_;
> $country = $::Values->{$::Variable->{UPS_COUNTRY_FIELD}} if
> ! $country;
> $zip = $::Values->{$::Variable->{UPS_POSTCODE_FIELD}} if
> ! $zip;
> $country = uc $country;
>
> my $shipping = 0;
> my %origins;
> $origins{$_->{origin}} = $_->{weight} for (@{$Carts->{main}});
>
> foreach (keys %origins){
> $shipping += $Tag->ups_query({
> mode => $_,
> origin => $origin,
> zip => $zip,
> country => $country,
> weight => $origins{$_},
> });
> }
>
> return $shipping;
> }
> EOR
>
> But get the same error.:(
> >
> > Global symbol "$origin" requires explicit package name at (eval
> 113) line 14, <GLOBAL> line 25.
> >
> > In line 25 of the configuration file 'usertag/ship.tag':
> > UserTag ship Routine <<EOR
> >
> Any other things to try?
>
A bookshop? :-)
Let's knock this on the head now, or we'll be treated to every line
change from here till next Christmas:
foreach (keys %origins){
$shipping += $Tag->ups_query({
mode => $mode,
origin => $_,
zip => $zip,
country => $country,
weight => $origins{$_},
});
}
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/