[ic] Multiple zone files for shipping?

Tim Murphy interchange-users@interchange.redhat.com
Mon Jan 28 00:38:01 2002


Hello,

    Here's the situation: I've created "bastardized" UPS files using Canada
Post shipping information that is looked up just as with any valid (i.e.
450.csv, 2ndDayAir.csv) zone and cost file combo. I know it works as I have
this running on a Minivend 3.14 catalog (still running!) and a 4.8.1
catalog. Basically, I have a zone file (and related cost file) for domestic
shipping, another for US shipping and another for international shipping.
The other difference is I do a lookup into the shipping tables based on ZIP
for domestic shipping, the STATE for the US, and the COUNTRY for
international shipping (this is dictated by the manner in which Canada Post
determines charges). The 4.8.3 shipping setup is confounding me this time
around! I tried simply adding a zone directive for each shipping mode and
modifying the lookup field used for ups-query, to wit:

shipping.asc:
DOM Canada Domestic weight  0       0       e Nothing to ship!
{ 'ui_ship_type' => "UPSE:DOM",  'zone' => "domzone", 'ups' => "0",
'at_least' => ".5", adder => "3.00" }
DOM Canada Domestic weight  0       150     f [ups-query zip="[either][value
zip][or][var SHIP_DEFAULT_ZIP][/either]" mode="DOM" weight="@@TOTAL@@"]

PUS Parcel Post US Surface weight  0       0       e Nothing to ship!
{ 'ui_ship_type' => "UPSE:PUS", 'zone' => "uszone", 'ups' => "0", 'at_least'
=> ".5", adder => "3.00" }
PUS Parcel Post US Surface weight  0       150     f [ups-query
zip="[either][value state][or][var SHIP_DEFAULT_ZIP][/either]" mode="PUS"
weight="@@TOTAL@@"]

You can see where I'm trying to use the state value for mode PUS (a poorly
chosen acronym...) I'll limit the following examples to the DOM mode.

The domzone.csv file looks like this:

ZIP,DOM
A0A-A9Z,5
B0A-B9Z,4
etc. etc.

Again, a bastardized UPS zone file.

The DOM.csv shipping cost file looks like this:

Weight,1,2,3,4,5
.5,2.58,2.78,3.4,3.89,4.24
1,3.05,3.25,3.95,4.48,4.89
etc. etc.

This DOM.csv file is correctly specified as a database, and is recognized by
Interchange (according to configdump). Here's the DOM.dbm file from dbconf:

Database            DOM       DOM.csv     CSV
Database            DOM       GUESS_NUMERIC     1

The entry for Canda in country.txt:

CA 1 North America CA DOM Canada CAN 124

Finally, in variable.txt I set SHIP_DEFAULT_COUNTRY to CA and
SHIP_DEFAULT_MODE to DOM. All these values are confirmed as being actually
set by configdump's output.

Unfortunately, on the checkout page, for shipping mode I always get:

"No match found for mode "DOM", quantity '', returning 0"
and the select box for shipping modes is empty. If I try changing the
country to US I get this message:

"No match found for mode 'PUS', quantity '3', qualifier '0 0 e Nothing to
ship! { 'ui_ship_type' => "UPSE:PUS", 'zone' => "uszone", 'ups' => "0",
'at_least' => ".5", adder => "3.00" }', returning 0."

The same error comes up for an international country, although of course
with different shipping mode and zone file.

I have compared everything I can think of between the 2 working catalogs and
the 4.8.3 catalog I'm trying to get running and all I can guess is that the
format in shipping.asc has REALLY changed and what I've entered is invalid.
Please, if any of you more familiar with shipping configurations (or Akopia
internals) can recommend something I'd be extremely grateful. I've been
staring at this problem so long I'm sure I'd miss even a simple solution by
now. I know it works, I just can't see what I have done wrong this time.

Many thanks,

Tim Murphy