Client-Side Error Trapping on City and State

hi,

We recently had a customer who typed "BETHESDA, MD" into the zipcode field of the checkout form.

The postal code field did not try to "auto-find" the city/state, assuming because it was not a valid postal code, and the customer also did not click the "Go" button next to the field. They proceeded to fill out and submit the form.

The client-side error-trapping did not catch the fact that "city" and "state" were unpopulated, but server-side error-trapping did catch this.

so my questions are:

1) Why no client-side error-trapping for postal codes that are not valid? assume this has to do with safeguarding against postal code that may not be in the system?

2) Why no client-side error-trapping for empty state and region fields? assume that these fields are not *always* required and it takes server-side logic to determine if they should be there or not?

thanks!
Comments
  • fc_adamfc_adam FoxyCart Team
    @freshjones,

    Great question. If a valid formatted postcode isn't entered, then the postcode field currently won't auto-validate, it will rely on the "Go" button being pressed. I can see what you're describing though and how it could be improved to catch customer entry errors like this. We'll look into this further and update as we're able to make any changes.
  • Hi,

    Any new on updates around this? The same issue has happened on our store a number of times now, where a customer will enter something else into the postcode field, such as the word "california". They do not click the go button but simply continue to fill out the form and click place order.

    because the go button was never clicked and because there isnt any error trapping on the postcode field customers are able to get around entering a proper postal code or city (because the city field never appears if the go button isn't clicked.)

    This is especially bad since we need to charge state tax in California so orders are coming in without the proper state tax being applied

    I'll put something in place on my own if need be, but I thought I'd ask and see if you addressed this issue or not.

    I can send you an example of how this happens if you want

    thanks!
  • fc_adamfc_adam FoxyCart Team
    @freshjones,

    Thanks for checking in - there isn't any changes to production just yet for this issue.

    That said - it sounds like you've seen orders come through with wrong details in the postcode field, and no city/state values - is that correct? If so - could you confirm any transaction ID's that you saw that for? You can whisper them to me if you're prefer to keep them private by checking the "whisper" checkbox and entering my forum username when replying.
  • fc_adamfc_adam FoxyCart Team
    @freshjones,

    Thanks for whispering that transaction. Reviewing the logs, the customer logged in to their account, so the saved city/state details were populated - but as you noted, their email address was also in the postcode field! This appears to have happened in their last transaction, so it's currently saved in their account as that.

    Are you comfortable with either of our API's? You could quickly update the customers saved addresses to have the correct zipcode for any future purchases, to ensure the email address doesn't come through again. If you're not comfortable with the API, let us know and we can get that customer updated for you.

    I've also added some additional details to the ticket on our side around validation for the postcode field - we'll hopefully have an update for you on that soon.
  • thanks Adam actually it would be awesome if you were able to fix that for us, I'm not sure I'm comfortable doing it through the API and it would take way longer than necessary to make that happen.

    can you please let me know when you get that additional validation set for the postalcode field?

    thank you!
  • fc_adamfc_adam FoxyCart Team
    @freshjones,

    No problems - we just updated the customer record so next time they checkout it'll show the right postcode.
Sign In or Register to comment.