[ic] USPS International shipping question - SOLVED

Dorothy Puma dorothy at digilink.net
Wed Oct 15 11:37:02 EDT 2003


[snip]
>> EMS     Global Express Mail     weight  0       0       e Nothing to 
>> ship!              {'ui_ship_type' => "UPSI",'table' => 
>> "ems_rates",'zone' => "123",'at_least' => "16.85",'adder' => 
>> "3.00",'str_length' => "2",'geo' => "country",}
>> EMS     Global Express Mail     weight  0       70      
>> u               {'PriceDivide' => "1",}
>> EMS     Global Express Mail     weight  71      9999999 e Too heavy 
>> for USPS    {'PriceDivide' => "1",}
>>
>>
>>
>> But, I'm missing something, as I'm getting an error:
>> Zero cost returned for mode ems_rates, geo code PR
>>
>> Also, one thing I noticed in the structure file is not all of the 
>> fields are showing. I should have Exceed, and 1 - 12, as there are 12 
>> zones, but 1-5 are missing:
>>
>>  'ems_rates' => {
>>                                            'NUMERIC' => {
>>                                                           '7' => 1,
>>                                                           '8' => 1,
>>                                                           'Exceed' => 1,
>>                                                           '9' => 1,
>>                                                           '10' => 1,
>>                                                           '11' => 1,
>>                                                           '12' => 1,
>>                                                           '6' => 1
>>                                                         },
>>                                            'DEFAULT_TYPE' => 
>> 'varchar(255)',
>>                                            'USER' => 'root',
>>                                            'Class' => 'GDBM',
>>                                            'NO_ASCII_INDEX' => '1',
>>                                            'included_from' => 
>> 'dbconf/mysql/ems_rates.dbm',
>>                                            'PASS' => 'xxxxxx',
>>                                            'file' => 'ems_rates.csv',
>>                                            'GUESS_NUMERIC' => '1',
>>                                            'type' => 4,
>>                                            'name' => 'ems_rates'
>>                                          },
> 
> 
> There could be (and probably are) several things amiss here, but one 
> thing that jumps out at me is that the internal table lookup routines 
> are not being told which column to consult in your ems_rates table. Take 
> a look at the UPS zone file (I believe it is 407.csv) that is provided 
> with the foundation demo and you will see that there is a named column 
> for each shipping method and the appropriate column is called out in the 
> shipping.asc entry for that method (prefixed by the 'u' method 
> identifier in your case). This is one reason why you would be coming up 
> with a goose egg for shipping. Another problem you could be facing is a 
> broken rates table (possibly caused by embedded carriage returns). 
> Finally, I seem to recall that the shipping routines use the first three 
> characters of the geo code for purposes of locating the shipping zone 
> and cost. I'm not sure if a two-character country code would be a 
> problem or not, but a look inside the shipping subroutines might be 
> worthwhile.
> 
> Good luck,
> 
> Ed L.
> 

Ed,

Thank you for your suggestions.  I finally was able to get back to it 
again this morning, and was able to get it to work.  My zone file was 
correct all the data was pulling out correctly. As far as the first 3 
characters pulling for the geo code, that is correct for default, but I 
placed this in my shipping.asc file:

'str_length' => "2",'geo' => "country"

Turns out I changed 2 things (not sure which one solved it), but my 
rates file had the weights with decimals instead of whole numbers, then 
my ems_rates.csv.numeric file had the incorrect fields. Once I deleted 
the decimals and the numeric file and restarted, it worked like a charm.

Next I'm going to work on the Global Priority and Air Parcel Post rates. 
  When I get them complete, I'll post a link to the zone/rate files.

Thanks all,
Dorothy





More information about the interchange-users mailing list