[ic] Orders to countries which have no states/provinces ?

DB DB at M-and-D.com
Sun Nov 4 10:22:15 EST 2007

IC 5.4.2 with a modified foundation catalog. On my checkout form,
"State/Province" is a required field. Some countries however have no
entries in the State table. When customers try to submit orders shipping
to such a country, a rather cryptic error appears and they can't proceed
(I use Skipjack). The error appears to be coming from Skipjack, but I'm
not certain that Interchange isn't generating the error. Error text is:

(Payment process): There was an error accepting payment: Real-time
 charge failed. Reason: Length of customer state (-82)
 Credit Card Information: Length of customer state (-82)

I've come up with a solution (see the [no match] section below) but I'm
worried that when the form updates, any custom State/Province info that
was entered won't be retained but could be overwritten by "NONE"

<td class="contentbar1" align=right>
[error name=statestd_label="[L]State/Province[/L]" required=1]

<td align="left" class="contentbar1" colspan=3>
       [loop search="
         se=[default country US]

[on-match]<SELECT onChange="check_tax(this.form)" NAME=state><option
value="">--[L]select state[/L]--

[loop-change 1][condition][loop-param country][/condition]
<OPTGROUP LABEL="[data table=country col=name key='[loop-param country]']">
                  [/loop-change 1]
                  <OPTION VALUE="[loop-code]">[loop-pos 1]

[no-match]<INPUT NAME=state VALUE="[value state]" SIZE=20>[/no-match]

[no-match]<INPUT NAME=state VALUE="NONE" SIZE=20> Edit if


If anyone has a more elegant solution I'd love to hear it. Maybe making
that field not required for such countries would be better, but I'm not
sure, nor am I sure how to do that. Thanks!


More information about the interchange-users mailing list