Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Can I add Zip Code Validation (ie: check is it a real zip code?) to a custom form?

    Have not yet upgraded to 1.5 but have a question on addresses/zip code validation. When I test and change addresses in my store account (logging in as a customer), I can put a bad zip code in the zip field and it does not tell me it's not valid. For the storefront, am using EZ Pages and links to html pages with 'buy' buttons linking to store ID and on the website also have a 'free offer' html form that is processed by php file. The free offer form is not part of the ZenCart, but as we move towards being able to upgrade to the latest ZenCart, am hoping there might be a way to move the free offer form to a ZenCart form and that there will be a way to validate the Zip Code is real for USA. Am looking for more than just ensuring for USA it's numerical and/or 5-4 format, as that's already in place, but am not finding a way to ensure if they enter a phoney zip code that the form won't process. Can this be handled within ZenCart, and if so, where would I begin? The upgrade is on the schedule, though I am concerned because of so many customizations so have been slow to begin. Anyway, please advise if more info is needed or further explanation, thank you for any help.

  2. #2
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: Can I add Zip Code Validation (ie: check is it a real zip code?) to a custom form

    I think this can be handled within Zen relatively easily. In the latest 1.5.1 there has been a notifier hook added to the create account process which is intended for a reCAPATCHA check. My Google reCAPATCHA mod makes use of it to try to stop spam accounts. This could easily be modified to instead check the zip code for correctness instead.
    Not sure about the edit account, but at least they will have created the account with a correct Zip.

  3. #3
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: Can I add Zip Code Validation (ie: check is it a real zip code?) to a custom form

    Thank you very much. I will check that out and it looks like I need to go ahead and do the upgrade so your mod can be utilized. This will be more for a form that does not go through the store, it's a free offer but maybe I am handling it wrong and should find a way to run it through ZenCart instead. It sounds like I need to first backup and start the upgrade process and then come back to address this form issue.

 

 

Similar Threads

  1. Check new users for zip code
    By jmacdoug in forum General Questions
    Replies: 2
    Last Post: 29 Jul 2011, 07:02 AM
  2. Zip Code Error Check?
    By powrwrap in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 1 Apr 2011, 12:33 AM
  3. Freeshipper zip code array failed - allowed an ineligible zip.
    By amylynpace in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 22 Jun 2010, 03:20 PM
  4. Please check that your Zip Code is entered correctly...
    By ksolito in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 17 Nov 2009, 12:18 AM
  5. Help need to set up per zip code shipping module with 5 zip code areas flat fee
    By cshart in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 11 Feb 2009, 06:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR