Ray UK Posted February 17, 2014 Share Posted February 17, 2014 (edited) I have "Need zip/postal code" checked in BO. Yet when adding an address in the "update address" page, there is nowhere to enter a postcode ? any solution to this ? Edited February 17, 2014 by MerseyRay (see edit history) Link to comment Share on other sites More sharing options...
Ray UK Posted February 17, 2014 Author Share Posted February 17, 2014 Here are the options I have, and the add address form. Link to comment Share on other sites More sharing options...
Ray UK Posted February 17, 2014 Author Share Posted February 17, 2014 Ah, there is a display:none attached to this field ? <p class="required postcode text" style="display: none;"> <label for="postcode">Zip / Postal Code <sup>*</sup></label> <input name="postcode" id="postcode" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" type="text" value="PR9 9BL"> </p> Where, and why is this applied ? it must be a jquery thing as I cant see it in the addresses.tpl file Link to comment Share on other sites More sharing options...
Ray UK Posted February 18, 2014 Author Share Posted February 18, 2014 Anybody have any ideas on how to solve this ? The display:none style is being applied, presumbly by jquery. Link to comment Share on other sites More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 can you show "address format" field form country edit page? Link to comment Share on other sites More sharing options...
Ray UK Posted February 18, 2014 Author Share Posted February 18, 2014 Sure here it is. Thanks Link to comment Share on other sites More sharing options...
Ray UK Posted February 18, 2014 Author Share Posted February 18, 2014 Not too sure why thats been happening, but as a temp workaround i have remove a bit of conditional code in authentication.tpl I have changed {elseif $field_name eq "postcode"} <p class="required postcode text"> <label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label> <input type="text" class="text" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" /> </p> {elseif $field_name eq "city"} to <p class="required postcodes text"> <label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label> <input type="text" class="text" name="postcode" id="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" /> </p> {elseif $field_name eq "city"} ie, removed the {elseif $field_name eq "postcode"} and added changed the class postcode to postcodes (incase jquery was attacking postcode) Link to comment Share on other sites More sharing options...
Ray UK Posted February 18, 2014 Author Share Posted February 18, 2014 Vekia, could this be related to the changes you suggested in this other post http://www.prestashop.com/forums/topic/308779-create-new-account-page-is-blank/?view=getnewpost That was also changes to authentication.tpl Link to comment Share on other sites More sharing options...
vekia Posted February 18, 2014 Share Posted February 18, 2014 no its definitely not related to this problem Link to comment Share on other sites More sharing options...
Julien_Snow Posted May 27, 2014 Share Posted May 27, 2014 Hi, I had the same issue. I searched on google but I thound nothing. So I checked the code and every ".js" files. I found the problem with "statesManagement.js" in my theme with this code : $('.id_state, .dni, .postcode').css({ 'display': 'none' }); so I removed the class and now it's working ! To find the googd file, use "ctrl + f" with the word "postcode", it will help you 1 Link to comment Share on other sites More sharing options...
Sickboards Posted April 4, 2015 Share Posted April 4, 2015 (edited) Does not work for me either, it works as it should when you go through the check out sequence (1 step / 5 step | guest or registered, all the same) but it fails when you go to login => register. No zip/postcode Updating / added addresses works. Just creating an account fails workaround is a 2 step registration process (register first add address later) Edited April 4, 2015 by Sickboards (see edit history) Link to comment Share on other sites More sharing options...
Jimmythebib Posted June 12, 2015 Share Posted June 12, 2015 Exact same issue on latest Prestashop version. So this issue has not been fixed or its a configuration gotcha or ? Looked everywhere online and in my config and even is some files to see if the field is there. Turned out to be javascript/css hiding the field for some reason (view source in your browser and ctrl+f and type postcodeto check its there). This may be the same as above. My hack fix was to add a line in the foot of global.css below .postcode{display:block !important;} This now shows the field allways but its crude and not a real fix. over to the javascripters perhaps. Jimmy Link to comment Share on other sites More sharing options...
Recommended Posts