[ic] Set minimum shipping weight
Dan Browning
interchange-users@icdevgroup.org
Mon Apr 14 17:25:00 2003
At 04:35 PM 4/14/2003 -0400, you wrote:
>Hello everyone,
>
>I am trying to set the minimum shipping weight for the total order.
>Each of my items are 1/2lb in weight. If the user has a total weight of
>less than 1 in their cart, I need the total weight of the cart to be
>rounded up to 1. Sounds simple, but I've tried the following:
>
>Tried the suggestions here:
>http://www.icdevgroup.org/pipermail/interchange-users/2001-June/009223.html
>
>Modified them a little like this:
>
>[seti total_weight][summary format="%s" total=1][/seti]
>[if scratch total_weight <= 1]
> [seti name=weight value="1"][/seti]
>[/if]
>
>and tried it via Perl:
>
>[perl]
>
>if($Scratch->{weight} < '1') {
> return $Scratch->{weight} = 1;
>}
>
>[/perl]
>
>
>Any ideas? You might ask why I'm doing this....well, I've written a
>user tag for USPS to query their rates (just like UPS and Fedex) and
>they don't accept anything lower than a pound. Once I get all the kinks
>worked out, I'll post the USPS tag. It actually works quite nice, but
>the weight issue is a big bug.
How about inside your USPS tag, you just modify the passed shipping weight?
# USPS requires weight is at least 1 pound.
$weight = 1 if $weight < 1;
--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies, <dan.browning@kavod.com> |
| 6700 NE 162nd Ave, Suite 210, Vancouver, WA (360) 843-4074 x217 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
Do you realize how many holes there could be if people would just take
the time to take the dirt out of them?