[ic] PLEASE HELP - Checkout Profile

Thomas J.M. Burton interchange-users@lists.akopia.com
Mon Jun 4 22:21:00 2001


I'm trying to set up a multi-page checkout in Interchange 4.6.5 and I'm having no
luck. The goal is to have the first page (checkout.html) contain the shipping address
fields and a Next Step button. The second page (checkout2.html) would have the order
total (including shipping), payment info, etc.

I've been able to set up the profile for the first page so that it's checking for the
required fields, but the problem occurs when I click the Next Step button. Instead of
going to the checkout2 page, it submits the order! I've been going around and around
on this one for hours and it's driving me nuts.

Here's what I've got for my code:

In etc/profiles.order
  __NAME__                            precheck
  &fatal = yes
  &set=mv_failpage ord/checkout
  &set=mv_successpage ord/checkout2
  fname=required
  lname=required
  address1=required
  city=required
  country=required
  [if value country =~ /^(US|CA)$/i]
   zip=postcode "[value zip]" is not a valid US/Canada postal code.
  [/if]
  &final = no
  __END__


  __NAME__                            checkout_profile
  This profile is the same as in the construct demo with the exception of
  the fields specified in precheck above.


In ord/checkout.html
  <FORM ACTION="[process secure=1]" METHOD="POST" name=precheckout>
  <INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">

  [if type=explicit compare="[error all=1 show_var=1 keep=1]"]
    <P>
    <font __FFACE__ size="2"><b>There were errors in your last submission.</b>
    <br>
    They are shown in <FONT COLOR=__CONTRAST__>__CONTRAST__</FONT>below.</FONT>
    <P>
  [/if]

  <INPUT TYPE=hidden NAME=mv_doit          VALUE=refresh>
  <INPUT TYPE=hidden NAME=mv_orderpage     VALUE=ord/checkout>
  <INPUT TYPE=hidden NAME=mv_nextpage      VALUE=ord/checkout>
  <INPUT TYPE=hidden NAME=mv_order_profile VALUE=precheck>
  <INPUT TYPE=hidden NAME=mv_order_route
       VALUE="[either]__ORDER_ROUTES__[or]log main copy_user[/either]">
  <INPUT TYPE=HIDDEN NAME=mv_check         VALUE="Save_database">

  [set Save_database]
  [userdb save]
  [/set]



  <input type=SUBMIT value="Next Step" name="mv_click">

  [seti clear_errors][error all=1 hide=1 comment="Clear errors"][/seti]

  [set Next Step]
  mv_todo=submit
  [/set]


Any help on this would be greatly appreciated. Please don't just refer me to the 1999
post documenting how to set up Multi-step Checkouts. I've been through that and still
had trouble. What would help most is pointing out specifically what I'm
missing/overlooking. Thanks!

-TJMB