[ic] Additional shipping calculation based on @@TOTAL@@
Bruno Cantieni
bruno at digi-land.com
Wed Sep 13 18:19:40 EDT 2006
> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org
> [mailto:interchange-users-bounces at icdevgroup.org] On Behalf Of Peter
> Sent: September 13, 2006 6:09 PM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] Additional shipping calculation based on @@TOTAL@@
>
> On 09/13/2006 06:12 AM, Bruno Cantieni wrote:
> >> -----Original Message-----
> >> From: interchange-users-bounces at icdevgroup.org
> >> [mailto:interchange-users-bounces at icdevgroup.org] On
> Behalf Of Peter
> >> Sent: September 12, 2006 5:22 PM
> >> To: interchange-users at icdevgroup.org
> >> Subject: Re: [ic] Additional shipping calculation based on
> @@TOTAL@@
> >>
> >> On 09/12/2006 06:28 AM, Bruno Cantieni wrote:
> >>> Hi all.
> >>> I have a shipping method where I want the "Additional
> >> shipping calculation"
> >>> (padding) to be based on the total shipping weight.
> >>> The method is basically plain UPS ground, internal lookup
> >> with the "Total"
> >>> criteria set to "Weight".
> >>> I expected the following to work:
> >>> int((@@TOTAL@@/35)+0.5)*10
> >>> Alas, @@TOTAL@@ in this case is actually the raw shipping
> >> cost before
> >>> padding, i.e. simply putting @@TOTAL@@ into the
> "Additional shipping
> >>> calculation" field effectively doubles the shipping cost :(
> >>> I'm curious if I misunderstand the @@TOTAL@@ usage?
> >>> I expected @@TOTAL@@ to be the shipping weight given the
> >> above setup.
>
> You didn't but with adder @@TOTAL@@ works differently. Try using
> @@CRIT@@ instead.
>
> >>> In the meantime, replacing the above formula with
> >> int(([weight]/35)+0.5)*10
> >>> actually works as expected (I diddled my Ship.pm to
> >> interpolate ITL in
> >>> adder).
>
> Rather than tweaking the core if you need to use tags in
> adder you could
> do this instead...
>
> int(($Tag->weight/35)+0.5)*10
>
> or if you really need to interpolate...
>
> {'continue' => 1 }
>
> ...then another entry with the same shipmode, criteria and
> limits with:
> f int(([weight]/35)+0.5)*10
>
> > The version which works looks like this:
> > heat Heat Safe weight 0 0 e
> Nothing to ship!
> > {'adder' => "int(([weight]/35)+0.5)*10",'geo' =>
> "zip",'ups' => "1",'zone'
> > => "zone",'ui_ship_type' => "UPSI",'table' => "NextDayAir",}
> > heat Heat Safe Shipping weight 0 150
> u NextDayAir [value
> > name=zip filter=digits default=45056]
> {'PriceDivide' => "1",}
> > heat Heat Safe Shipping weight 150 9999999
> e Too heavy for UPS
> > {'PriceDivide' => "1",}
> >
> > What I tried was:
> > heat Heat Safe weight 0 0 e
> Nothing to ship!
> > {'adder' => "int((@@TOTAL@@/35)+0.5)*10",'geo' =>
> "zip",'ups' => "1",'zone'
> > => "zone",'ui_ship_type' => "UPSI",'table' => "NextDayAir",}
>
> Heh, that definitely won't work. I think you mistyped and
> meant to put:
>
> heat Heat Safe Shipping weight 0 150 u
> NextDayAir [value name=zip
> filter=digits default=45056] {'adder' =>
> "int((@@TOTAL@@/35)+0.5)*10",'geo' => "zip",'ups' => "1",'zone' =>
> "zone",'ui_ship_type' => "UPSI",'table' => "NextDayAir",}
>
>
> Peter
>
Thanks Peter.
I will give it another try when I have a moment :)
Bruno
More information about the interchange-users
mailing list