[ic] Error in shipping cost calculation

Ed LaFrance interchange-users@interchange.redhat.com
Thu Mar 28 12:40:01 2002


At 07:48 AM 03/28/2002 +0100, you wrote:
>Hello List,
>
>I am using something like this in my shipping.asc
>
>Packet  Zone 0  weight [data table="country" field="zone" code="[value 
>country]"]       0       0       e Nothing to ship
>Packet  Zone 0  weight 0        1       4000    4.60
>Packet  Zone 0  weight 0        4001    8000    5.37
>Packet  Zone 0  weight 0        8000    12000   6.14
>Packet  Zone 0  weight 0        12001   16000   6.91
>Packet  Zone 0  weight 0        16001   20000   7.68
>Packet  Zone 0  weight 0        20001   9999999 e @@TOTAL@@ grams is too 
>heavy to ship
>Packet  Zone 1  weight 1        1       4000    14.60
>Packet  Zone 1  weight 1        4001    8000    18.70
>Packet  Zone 1  weight 1        8000    12000   22.75
>Packet  Zone 1  weight 1        12001   20000   31.00
>Packet  Zone 1  weight 1        20001   9999999 e @@TOTAL@@ grams is too 
>heavy to ship
>
>but this does not do the job like expected instead i get no error in 
>error.log just 0 as shipping cost.

The basic format of the shipping table is ( -> = TAB):

mode -> description -> criteria -> min -> max -> cost/calc/lookup

...and as far as I know this has not changed since the Minivend days, 
though many other options have been added to the right side. Based on this, 
your format above is in error. The 0/1 immediately after 'weight' is 
extraneous and is probably the think that breaks the calculation.

- Ed L.




>But in [data session ship_message] there is "No match found for mode 
>'Packet', quantity '1500', qualifier '0 ' returning 0. "
>This space after the 0 behind qualifier is wrong here, i think.
>I looked closer at this problem and discovered that here is a trailing 
>space problem with this database lookup,
>because i checked this in Interpolate.pm where i found the source of the 
>above mentioned errorstring.
>In Interpolate.pm it is found at line 7104 in Version $Id: 
>Interpolate.pm,v 2.9 2001/08/06 16:15:24 heins Exp $
>Then i put "$qual =~ s/\s+//g; behind line 6851 of Interpolate.pm and then 
>the error was gone.
>
>So i am not sure if this is a IC or my fault, please help me!
>
>Cheers,
>Karsten Fuhrmann
>
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================