Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2013
    Posts
    111
    Plugin Contributions
    2

    Default Only number entries for mobile version of my site for zip code

    On my phone when registering to my site for zip code it only allows number input and not letters. As UK postcodes are NE282PJ in format how can i fix the issue. No issues with main site just mobile version

    It can be seen via www.predator-charters.uk

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Only number entries for mobile version of my site for zip code

    Version v1.5.5 responsive_classic replaces the input type with HTML5 input types for mobile devices using jQuery.

    in \includes\templates\responsive_classic\jscript\jscript_responsive_framework.php

    find:
    Code:
    $('input#postcode').clone().attr('type','number').insertAfter('input#postcode').prev().remove();
    and remove that line, it will convert back to a "text" input type

  3. #3
    Join Date
    Feb 2013
    Posts
    111
    Plugin Contributions
    2

    Default Re: Only number entries for mobile version of my site for zip code

    Code:
    /customers/f/6/2/predator-charters.uk/httpd.www/includes/templates/template_default/templates/tpl_modules_address_book_details.php
    
    Line # 97 : <?php echo zen_draw_input_field('postcode', $entry->fields['entry_postcode'], zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode" placeholder="' . ENTRY_POST_CODE_TEXT . '"' . ((int)ENTRY_POSTCODE_MIN_LENGTH > 0 ? ' required' : '')); ?> 
     
    /customers/f/6/2/predator-charters.uk/httpd.www/includes/templates/template_default/templates/tpl_modules_checkout_new_address.php
    
    Line # 94 : <?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode" placeholder="' . ENTRY_POST_CODE_TEXT . '"' . ((int)ENTRY_POSTCODE_MIN_LENGTH > 0 ? ' required' : '')); ?> 
     
    /customers/f/6/2/predator-charters.uk/httpd.www/includes/templates/template_default/templates/tpl_modules_create_account.php
    
    Line #111 : <?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode" placeholder="' . ENTRY_POST_CODE_TEXT . '"' . ((int)ENTRY_POSTCODE_MIN_LENGTH > 0 ? ' required' : '')

  4. #4
    Join Date
    Feb 2013
    Posts
    111
    Plugin Contributions
    2

    Default Re: Only number entries for mobile version of my site for zip code

    sorted thanks

  5. #5
    Join Date
    Mar 2010
    Location
    Nottingham UK
    Posts
    87
    Plugin Contributions
    1

    Default Re: Only number entries for mobile version of my site for zip code

    Quote Originally Posted by rbarbour View Post
    Version v1.5.5 responsive_classic replaces the input type with HTML5 input types for mobile devices using jQuery.

    in \includes\templates\responsive_classic\jscript\jscript_responsive_framework.php

    find:
    Code:
    $('input#postcode').clone().attr('type','number').insertAfter('input#postcode').prev().remove();
    and remove that line, it will convert back to a "text" input type
    I know this thread is quite old, but I wanted to post a thanks to rbarbour for the answer (and womble for asking the question).
    I've spent a some time searching through the html_output functions and pulling my hair out over where it has been changing the type from text to number and this was the answer!
    I'm guessing this works great for US zip codes, but not for postal codes, maybe worth documenting this somewhere as I'd imagine it'll be quite a common problem?

    Thanks again

  6. #6
    Join Date
    May 2004
    Location
    UK
    Posts
    478
    Plugin Contributions
    0

    Default Re: Only number entries for mobile version of my site for zip code

    thank you thank you thank you - I cannot believe that I didn't know about this and wow screws up any UK customer trying to set up an account via mobile - could these be updated for newer versions so that this doesn't happen!?

    Thank you for asking/finding this though - saved my bacon today!

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,500
    Plugin Contributions
    88

    Default Re: Only number entries for mobile version of my site for zip code

    Quote Originally Posted by SarahL View Post
    thank you thank you thank you - I cannot believe that I didn't know about this and wow screws up any UK customer trying to set up an account via mobile - could these be updated for newer versions so that this doesn't happen!?

    Thank you for asking/finding this though - saved my bacon today!
    The correction has been in the Zen Cart distribution since v1.5.5b!

 

 

Similar Threads

  1. Use of subdomain for mobile specific template version?
    By Feznizzle in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Oct 2015, 09:04 PM
  2. Check new users for zip code
    By jmacdoug in forum General Questions
    Replies: 2
    Last Post: 29 Jul 2011, 07:02 AM
  3. Associate x product(s) to zip code for shipping estimate
    By BobDGinn in forum Addon Shipping Modules
    Replies: 5
    Last Post: 1 Sep 2010, 01:28 PM
  4. New Version 1.3.7 -- looking for changed-files-only ZIP
    By ccn1 in forum General Questions
    Replies: 3
    Last Post: 28 Dec 2006, 06:49 PM
  5. Rates for Food Delivery by Zip Code?
    By Oopsie in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 11 May 2006, 07:28 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