Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    Removing Post/ZIP Code from signup

    Howdy,

    As some countries do not have Post/ZIP codes (New Zealand for example), what is the best way to remove the Post/ZIP code field from account creation/signup? I don't want Post/ZIP codes associated with the site in any way whatsoever.

    If you just comment the Post/ZIP code field out, that doesn't stop the JavaScript checks on whether or not the Post/ZIP code is at least 4 characters long. I suppose I could set ENTRY_POSTCODE_MIN_LENGTH to 0 to get around this, but that seems like a dodgy way of doing things. Is there an option that can be switched on or off in the admin somewhere? Cheers.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Removing Post/ZIP Code from signup

    Are you only shipping to an area that doesn't use a postal code?

  3. #3
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: Removing Post/ZIP Code from signup

    Yes - shipping will be to New Zealand only.

    I've noticed that commenting out the following in includes\modules\pages\create_account\jscript_form_check.php doesn't seem to stop the checking of the postcode field?

    check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo ENTRY_POST_CODE_ERROR; ?>");
    Last edited by eccentric; 16 Oct 2006 at 06:04 AM.

  4. #4
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Removing Post/ZIP Code from signup

    There is not a switch for the postal code at this time. You can disable the javescript check on that field and then remove the display in your custom templates.

  5. #5
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: Removing Post/ZIP Code from signup

    Yep, cool, that's what I've tried to do. It seems that commenting out the line I mentioned above does not prevent the JavaScript check though. Would you or someone else please be able to confirm which line or lines actually do the postcode check? Thanks.

  6. #6
    Join Date
    Jul 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: Removing Post/ZIP Code from signup

    For anyone interested, you need to comment out the following lines in includes\modules\create_account.php (line 187):

    if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
    $error = true;

    $messageStack->add('create_account', ENTRY_POST_CODE_ERROR);
    }

  7. #7
    Join Date
    Sep 2005
    Location
    Hong Kong
    Posts
    307
    Plugin Contributions
    0

    Default Re: Removing Post/ZIP Code from signup


 

 

Similar Threads

  1. v139h Shipping zones by zip/post code
    By amyleew in forum Addon Shipping Modules
    Replies: 4
    Last Post: 12 Feb 2014, 07:59 AM
  2. How do I disable post/zip code?
    By heavydrinker in forum General Questions
    Replies: 2
    Last Post: 9 Sep 2011, 12:05 PM
  3. Pre populate Zip Post code
    By beco1979 in forum General Questions
    Replies: 3
    Last Post: 29 Mar 2011, 09:55 PM
  4. Post/Zip Code box in Shipping Estimator
    By micmed in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 27 Oct 2010, 02:10 PM
  5. Remove Post/Zip Code from Cart Page only
    By plaz in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Jul 2010, 10:44 AM

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