[ic] USPS Priority Mail Shipping via UPS Style Lookup returns zero (whoops... read this one)

Mike Heins interchange-users@interchange.redhat.com
Sun Jan 20 21:16:01 2002


Quoting JT Justman (jt@signless.com):
> got a little trigger happy : ) Here's the whole thing:
> 
> Hello, everyone! I'm using IC 4.8.3 working with an overhauled Foundation
> cat (bears little resemblance on the user end). I have been using a flat $5
> shipping charge, but I want to only charge the actual Priority Mail charge.
> 
> A search on the list turned up several fairly detailed messages about this.
> I decided that Jim Balcom's message
> (http://interchange.redhat.com/archive/interchange-users/2002/msg07154.html)
> was the most detailed. I have tried this numerous ways, here is my latest
> attempt:
> 
> 1) Made the following lines the only ones in shipping.asc:
> 
> Priority<tab>Priority<tab>weight<tab>0<tab>0<tab>e Nothing to ship!
> Priority<tab>Priority<tab>weight<tab>0<tab>150<tab>u Priority [value
> name=zip filter=digits default=22306]<tab>{}
> Priority<tab>Priority<tab>weight<tab>150<tab>999999<tab>e @@TOTAL@@ lbs too
> heavy for Priority Mail<tab>{}
> 
> 2) Set up Priority.csv with the data from the USPS website:
> 
> Exceed,1,2,3,4,5,6,7,8
> 1,3.5,3.5,3.5,3.5,3.5,3.5,3.5,3.5
> 2,3.95,3.95,3.95,3.95,3.95,3.95,3.95,3.95
> 3,5.2,5.2,5.2,5.2,5.2,5.2,5.2,5.2
> 4,6.45,6.45,6.45,6.45,6.45,6.45,6.45,6.45
> 5,7.7,7.7,7.7,7.7,7.7,7.7,7.7,7.7
> ...and so on...
> 
>  I made sure there was a column for each zone, as the original USPS zone
> listed 1,2,3 together.
> 
> 3) Made a Priority.csv.numeric as follows:
> 
> Exceed 1 2 3 4 5 6 7 8
> 
> Following the example of ground.csv.numeric.
> 
> 4) In my zone file (450.csv) I added a column called Priority and populated
> it with the data in the Ground column:
> 
> "ZONE CHART"
> "UPS Ground/UPS 3 Day Select/UPS 2nd Day Air/UPS 2nd Day Air A.M./UPS Next
> Day Air Saver/UPS Next Day Air/USPS Priority Mail"
> 
> "For shipments originating in ZIP Codes 450-01 to 452-99.  To determine
> zone"
> "take the first three digits of the receiver's ZIP Code and refer to the
> chart below:"
> 
> "ZONES"
> Dest. ZIP,Ground,3 Day Select,2nd Day Air,2nd Day Air A.M.,Next Day Air
> Saver,Next Day Air,Priority
> 
> 004-005,4,304,204,244,134,104,4
> 006-007,-,-,225,-,-,125,-
> 8,-,-,[1],-,-,[1],-
> 9,-,-,225,-,-,125,-
> ...and so on...
> 
> This is not my origin zipcode, I am merely using it for testing.
> I also tried:
> 
> "ZONE CHART"
> "Priority"
> 
> Dest. ZIP, Priority
> 001-999, 1
> 
> For debuging.
> 
> 5) I put the following entry in my country.txt:
> 
>   US<tab>0<tab>US<tab>Priority<tab>United States<tab>USA<tab>840
> 
> 6) changed catalog.cfg mv_shipmode to Priority
> 
> 7) Did "apply changes".
> 
> 8) Put the code:
> 
> [shipping-desc Priority][shipping mode='Priority']<BR>
> 
> in a page. This returns:
> Priority$0.00
> 
> And the error:
> 
> 63.224.203.250 G4mac6Vo:63.224.203.250 - [20/January/2002:11:09:33 -0500]
> edenclothing /cgi-bin/edenclothing.cgi/showvars.html Shipping 'u' lookup
> called, no zone defined
> 
> What does this mean? Is it not finding the zone table, or is it saying that
> there is no zone in the rate table to match the zone?

No zone data, i.e. the "u" zone has not found 450.csv.

There are two ways to define this. The default UPS zone is "u", others
are A - Z.

You might try enableing DEBUG in interchange.cfg and then looking
at the *.structure file in your catalog directory. That should tell
you where the zone data is going (if anywhere).

Are you sure you have:

	UpsZoneFile 450.csv

in your catalog.cfg? If that line is not there, it would explain
your problem.

If you do have it, I suggest doing the shipping definition in the
named format in shipping.asc:

Priority: Priority Mail
    criteria     weight
    zone         450
    geo          zip
    default_geo  45056
    adder        3
    table        Priority
    ui_ship_type UPSI
    
    min         0
    max         0
    cost        e Nothing to ship!

    min         0   
    max         150
    cost        u

    min         0
    max         150
    cost        e Too heavy for UPS

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Few blame themselves until they have exhausted all other possibilities.
 -- anonymous