KonaKart Community Forum

Installation / Configuration => Configuration of KonaKart => Topic started by: Steveinjava on March 07, 2008, 10:36:24 pm

Title: State/County field problem
Post by: Steveinjava on March 07, 2008, 10:36:24 pm
I am tending to get customer addresses through with a unfortunate inaccuracy...Customers are entering their country and (predictably) not noticing the state/county field above changing to a drop down box with the first opton preselected.
As a result, for a UK customer, I am getting Aberdeen as the county when the person lives in the south: And Alabama for a US citizen.

IMO This is a simple error- The drop down box needs a default option entitled "Pick a county/state here" and this option needs to be validated against. So if a customer fails to notice the box the page will not submit until it IS filled in.

From what I can see its not possible to sort this without the bean source so does anyone know if this issue is known about?
Title: Re: State/County field problem
Post by: ryan on March 08, 2008, 07:27:24 am
Hi Steve,

Have you tried editing the RegisterCustomerBody.jsp ?

<td >
   <html:select name="RegisterCustomerForm" property="state">
      <html:option key="register.customer.body.invalid.zone" value="-1"></html:option>
      <html:options collection="zoneArray" property="zoneName"  labelProperty="zoneName"></html:options>
   </html:select>
</td>   

The red line is the one to add because it will create a first entry to the list, asking the user to choose a state / county. BTW, you may want to change the actual label since I've picked one that already exists in the message catalog for demonstration purposes. If the user just goes ahead without selecting a state, it will continue giving him an error.

Let me know if this works for you.      
Title: Re: State/County field problem
Post by: Steveinjava on March 08, 2008, 12:14:49 pm
Ryan, thanks- I had tried altering that file in a similar way but was unsure if it would affect unregistered customers and registering clients:
I had also amended, in the same way, EditAddrBody.jsp but it hadn't helped.
Either way, using the exact script you suggest still nothing has changed... I am not 100% sure but maybe using a collection of options makes the single option invisible in some way? I seem to remember a similar issue with some straight HTML markup I did one time.
Have you actually had this modification working yourself?
(I did restart Tomcat etc)
Title: Re: State/County field problem
Post by: ryan on March 08, 2008, 06:44:30 pm
Hi Steve,

I did try it out before posting and it worked for me. Try making some other obvious change in the JSP just to be sure that it is picking up the modified one.
Title: Re: State/County field problem
Post by: Steveinjava on March 09, 2008, 08:33:40 pm
Ryan, thanks again for your help. I did a simple change and it did show so it is being read.
So then I removed the line so it is back as original and the functionality is also back to square one.
So I got thinking, maybe it is the register.customer.body.invalid.zone key value? Maybe my copy doesn't have that set?
So I tried using
<html:option value="-1">Enter county here</html:option>
and this didn't appear either...I still get Aberdeen for a UK entry and Alabama for a US one.  :(
If you are sure it works for you I guess it must be that we have another file different?  ???