MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Getting closer, but still no cigar.



Hi Brian -

I don't think the weight is stored in the cart, you have to look it up
from the database.  Maybe try this change:

> Sub <<EOG
> sub calc_item {
>         my $totalweight = 0;
>         my $surcharge = 0;
>         my $quan = scalar @{$Safe{items}};
>         foreach $item (@{$Safe{items}}) {
>            #$totalweight = ($totalweight + $item->{weight});
             my $weight = tag_data("products","weight",$item->{'code'}) || 0;
             $totalweight += $weight;
>            #$quan++;
>         }
>         $surcharge = ($quan - 1) * ($totalweight * .03);
>         return $surcharge;
> }
> EOG


Larry Leszczynski
larryl@furph.com
--
  furph, Inc.	WWW/Unix/Windows Solutions	734-513-7763 (voice)
info@furph.com	   http://www.furph.com		734-513-7759 (FAX)



Search for: Match: Format: Sort by: