Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default How do I set a maximum value for Postal Code in the Admin?

    Is this possible in the Admin? I set the minimum value to 5. Thing is my customers are entering their complete Postal Code with the additional digits (for example, 12345-0987 instead of just the standard 5 character 12345 Postal Code). When this happens the tax calculations are incorrect.

    I tried limiting the input via HTML right on the page by deleting the php:
    PHP Code:
     <li>
            
              <label class="inputLabel" for="postcode_shipping"><?php echo ENTRY_POST_CODE . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' ENTRY_POST_CODE_TEXT '</span>'''); ?></label>        
            
      <?php echo zen_draw_input_field ('postcode'$_SESSION['postcode'], zen_set_field_length (TABLE_ADDRESS_BOOK'entry_postcode''40') . ' id="postcode"'); ?>
            
            </li>
    and using HTML:
    HTML Code:
    <input type="text" id="postcode" maxlength="5" size="5" name="postcode">
    When I did this I set the minimum characters in the Admin to 5 as well. Now when customers enter their address an error comes up asking to enter their Postal Code as if they never did entered anything.

    Also, I should note that I'm using the Numinix Quick Checkout plugin so this could lead me to think that it's running through the javascript.

    Thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I set a maximum value for Postal Code in the Admin?

    Quote Originally Posted by thebigkick View Post
    When this happens the tax calculations are incorrect.
    Um ... Zen Cart's built-in tax calculations are not based on Postal/Zip code.

    I suggest that perhaps your problem is really in your customized code/addons that are doing tax calculations differently than what Zen Cart normally does.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jan 2012
    Location
    Montreal
    Posts
    84
    Plugin Contributions
    0

    Default Re: How do I set a maximum value for Postal Code in the Admin?

    I have an plugin setup to change the price of delivery based on the postal code. so i guess it is a bug in the 3rd party plugin.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I set a maximum value for Postal Code in the Admin?

    I would suggest that if that plugin depends on a 5-digit code that it should be adjusted to do its own trimming of the data before it applies its logic.

    You really don't want to prevent the customer from giving the more accurate longer number, since if you were to ever choose to engage a shipping service that needed that information, then you'd want it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. How to put a maximum value limit on a coupon ?
    By samar777 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 10 Mar 2010, 02:47 PM
  2. show page number links when products over the set maximum value
    By smalllink in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 13 Feb 2010, 07:31 AM
  3. Adding Street Address and Postal Code to Main 'Admin' Page
    By jacque427 in forum Managing Customers and Orders
    Replies: 0
    Last Post: 17 Apr 2009, 07:10 PM
  4. How to set the locale on admin pages? - for Hebrew
    By Makover in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 15 Jul 2008, 07:37 PM

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