[ic] UPSE Online, special handling charge, adder

Steve Graham icdev at mrlock.com
Wed Nov 19 23:12:09 UTC 2008


>
> Steve,
>
> An adder in shipping.asc is a good idea, but would require modification to
> every shipping method. You could build it into the handling system, and
> that would only have to be defined one time, but that's not something I
> would find desirable.
>
> The way I've done this before is to use SpecialSub shipping_callout. This
> feature allows you to build a GlobalSub that takes the existing shipping
> amount, checks the cart for applicable items, then adds the fee. Whatever
> customizations you need will automatically apply to every shipping method.
> For example (untested):
>
> # A perly true value in 'products.oversized' field adds UPS fee.
> AutoModifier oversized
>
> Variable UPS_OVERSIZED_FEE 25.00
>
> Sub custom_shipping <<EOS
> sub {
>    my ($final, $mode, $opt, $o) = @_;
>
>    $final += $Variable->{UPS_OVERSIZED_FEE}
>        if grep {$_->{oversized}} @$Items;
>
>    return $final;
> }
> EOS
>
> SpecialSub shipping_callout custom_shipping
>
> --
> Daniel Browning
> End Point Corporation
> http://www.endpoint.com/

Thanks Daniel,

That is what I was looking for.

Steve
 




More information about the interchange-users mailing list