[ic] Fix Shipping charge

Mark Johnson interchange-users@lists.akopia.com
Tue Aug 7 10:13:01 2001


FMU wrote:
> 
> 
> My shipping.asc seemed to be OK, anyway I changed it onemore time to:
> 
> FLAT    Post    quantity        0       0       e Nothing to ship!
> FLAT    Post    quantity        1       150     1.95
> FLAT    Post    quantity        150     999999  2.95
> default Post    quantity        0       0       e Nothing to ship!
> default Post    quantity        1       9999999 3.95
> default Post    quantity        150     999999  3.95
>
> In catalog.cfg I set mv_shipmode to FLAT
> but nothing happened to my shipping charge -> still displaying 0,00


When what should obviously work doesn't, one has to start asking silly
questions; so, believe me, I'm not insulting your intelligence. FWIW, it
looks to me, without being able to inspect everything personally, that
you did everything right.

(1) shipping.asc is a database-like file, and not a config file. So, be
sure your fields are tab-separated (looks like they are from the
cut-and-paste, but still) :)

(2) Put [value mv_shipmode] in a test page, and make sure it's resolving
to FLAT. Or, at the top of the checkout page, explicitly set it: [value
name=mv_shipmode set=FLAT hide=1].

(3) Changes to shipping do not take effect until you restart, so make
sure you've done that since you made the changes.

(4) If you've done much customization, or especially any core overrides,
trace through that code and see if anything in there may be influencing
the value of shipping.

> I thought about IC is not recognizing shipping.asc wich is in the
> products directory - do I have to insert some special entries in my catalog.cfg
> that this file is being parsed by IC??

By default, IC assumes ProductDir to be products/; and, further by
default, IC expects to find the shipping definitions in a file named
shipping.asc in the directory defined to be ProductDir. So, if you
haven't set ProductDir to something explicitly, then you shouldn't need
to add anything to catalog.cfg for shipping.

> Robert wrote I have to be logged in as a user before going to checkout -
> well I didn't even
> get the UserDB to run (thanx god I dont need it). I copied the
> userdb.asc file of the construct
> demo into my products directory - but no userdb.gdbm file has been build
> after restarting IC.

You should not have to log in to see shipping in general, and definitely
not in this case. Also, be aware that Database definitions have changed
as Minivend has evolved into IC. So, in your MV3 cat, you no doubt have
all your Database defs right in catalog.cfg. But, as of IC 4.6, you will
no longer find those defs in catalog, but rather in files from
catroot/dbconf/*. So, just having userdb.(asc|txt) in the products/ dir
isn't enough; you also need the config definition, which used to be in
catalog.cfg (and could be in your case if you want it).

Database  userdb   userdb.(asc|txt)  TAB

Also, the .gdbm will not be generated until the first time userdb is
actively accessed. Normally, though, this would be no later than the
first order placed as, by default, IC generates a user automatically if
the person buying is not already logged in (code in log_transaction).

> (By the way - why do I have to kill my Interchange process before I can
> restart IC???)

Minivend died before it restarted too. Using ICRoot/bin/restart will do
the kill and start-up for you (assuming you aren't using the rpm).

> Sorry for almost getting pissed off
> (spent almost 2 days on shipping charge without result)

Frustration understood. I suspect you're going to find that you
overlooked something very small, given that it looks like you've
accounted for everything that's big.

-- 
Mark Johnson
Senior Systems Architect - Professional Services
Red Hat, Inc.
E-Business Solutions
markj@redhat.com
703-456-2912