Jump to content

No postcode in "Add address" page ?


Recommended Posts

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

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

  • 3 months later...

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 ;)

  • Like 1
Link to comment
Share on other sites

  • 10 months later...

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 by Sickboards (see edit history)
Link to comment
Share on other sites

  • 2 months later...

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

×
×
  • Create New...