[ic] USPS International shipping question
Ed LaFrance
edl at newmediaems.com
Mon Oct 6 10:43:07 EDT 2003
At 07:13 PM 10/5/2003 -0700, you wrote:
>Hello All,
>
>I'm running 4.9.7 and looking at getting EMS (Global Express) and GPM
>(Global Priority Mail) setup. I've pulled together a rates file from USPS
>(converted the html file into a csv file).
>
>[snip]
>Exceed,1,2,3,4,5,6,7,8,9,10,11,12
>0.5,15.50,16.75,20.00,17.00,19.00,17.00,23.00,17.00,19.00,22.75,28.50,22.25
>1.0,16.25,20.00,24.75,21.00,22.75,19.15,26.00,20.50,22.00,25.25,31.25,24.75
>2.0,17.00,23.70,28.75,25.00,26.05,21.65,29.00,24.00,26.00,28.25,35.50,28.00
>3.0,18.25,27.60,32.75,29.00,30.50,24.95,32.00,28.00,30.00,32.50,40.50,32.00
>4.0,19.25,31.10,35.75,33.00,34.90,28.15,35.00,32.00,35.00,36.50,44.75,36.00
>5.0,20.50,34.20,38.75,36.75,39.20,31.85,38.00,36.00,40.00,40.75,49.75,40.00
>6.0,22.75,36.40,41.75,40.05,43.45,34.95,41.20,40.20,44.65,45.00,54.50,44.00
>7.0,25.00,38.60,44.75,43.35,47.70,38.05,44.40,44.40,49.30,49.25,59.25,48.00
>8.0,27.25,40.80,47.75,46.65,51.95,41.15,47.60,48.60,53.95,53.50,64.00,52.00
>[/snip]
>
>I've also used their country listing to get the zones for each country to
>correspond to the rates file.
>
>[snip]
>AF,-
>AL,6
>DZ,11
>AS,-
>AD,6
>AO,11
>AI,12
>AQ,-
>AG,-
>AR,12
>AM,7
>[/snip]
>
>I've setup a new shipping method based on the country:
>
>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.
===============================================================
New Media E.M.S. Technology Solutions for Business
11630 Fair Oaks Blvd., #250 eCommerce | Consulting | Hosting
Fair Oaks, CA 95628 edl at newmediaems.com
(916) 961-0446 http://www.newmediaems.com
(866) 519-4680 Toll-Free (916) 961-0447 Fax
===============================================================
More information about the interchange-users
mailing list