[ic] Handling question?

Mike Heins interchange-users@lists.akopia.com
Tue Jun 26 12:35:01 2001


Quoting Ed LaFrance (edl@newmediaems.com):
> At 02:30 PM 06/26/2001 +0200, you wrote:
> 
> >I need to include a fixed fee if the payment is COD,
> >
> >Someone suggest me to use handling feature,but there is not any example
> >in the interchange documentation.
> >could someone explain in simple terms how I do this.
> >
> >best regards
> >Salvador Caballe
> 
> Well, there is an example, in fact:
> http://interchange.redhat.com/cgi-bin/ic/dev/icdatabase_42.html
> 
> ...but it is not specifically for COD.  In the construct demo, you could do 
> something like this on the checkout page:
> 
> 
> [comment]add this near the top of the page[/comment]
> [if value payment_method eq 'cod']
> [and !value mv_handling]
>          [value name=mv_handling set="cod_charge" hide=1]
> [/if]
> 
> [comment]add an option to the existing payment_method selector[/comment]
> <SELECT NAME="payment_method" onChange="this.form.submit()">
> ...
> <option [selected payment_method cod] value="cod"> C.O.D.
> ...
> </select>
> 
> ...then put your cod charge line in shipping.asc:
> 
> cod_charge      C.O.D. Charge   price   0       999999999       f 3
> 
> ..and reconfigure. When the user selects the COD payment method, the 
> shipping charges for their order should increase (by $3, in my example).
> 
> I haven't tried it - this is just my understanding from the docs.  You 
> would also need to add appropriate display elements and logic to inform the 
> user that the charge is being levied.

Exactly correct. Actually, if you look at etc/profiles.order you will
see:

[elsif value fax_order == 3]
&set = mv_payment COD
[value name=mv_handling set=cod hide=1]
[/elsif]

There doesn't appear to be a COD option on the checkout page selector, though.
That can easily be added. I think the new foundation checkout page and
receipts, etc, even handle mv_handling. 8-)

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

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman