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

ic at 3edge.com ic at 3edge.com
Sun Nov 4 10:36:18 EST 2007


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of DB
> Sent: zondag 4 november 2007 17:22
> To: interchange-users at icdevgroup.org
> Subject: [ic] Orders to countries which have no states/provinces ?
> 
> 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"
> 
> <tr>
> <td class="contentbar1" align=right>
> [error name=statestd_label="[L]State/Province[/L]" required=1]
> </td>
> 
> <td align="left" class="contentbar1" colspan=3>
>        [loop search="
>          fi=state.txt
>          sf=country
>          se=[default country US]
>          rf=state,name,country
>          un=yes
>          tf=sorder,name
>          ml=100
>          "
>          option=state]
> 
> [on-match]<SELECT onChange="check_tax(this.form)" NAME=state><option
> value="">--[L]select state[/L]--
> [/on-match]
> 
> [list]
> [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]
>                   [/list]
>                   [on-match]</SELECT>[/on-match]
> 
> [comment]
> [no-match]<INPUT NAME=state VALUE="[value state]" SIZE=20>[/no-match]
> [/comment]
> 
> [no-match]<INPUT NAME=state VALUE="NONE" SIZE=20> Edit if
> required[/no-match]
> 
> [/loop]
> </td>
> </tr>
> 
> 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!

The error says 'length of state' to be an issue. Are you sure that 'NONE'
actually works?
I would assume that the state-length expected is 2 characters. So it would
be rejecting everything else.
If that is the case I'd add a   <option VALUE='NA'>Not Applicable
as option ... 

CU,

Gert






More information about the interchange-users mailing list