Jump to content

[SOLVED] "state" field not showing up in checkout for IE users


Recommended Posts

A number of people have tried - unsuccessfully- to place an order on our site, describing a problem where they must enter their state but the field is not there. As you know, you select the country and then the state field pops up. Well, in IE, it doesn't show up. Not even with the country selected as default.

 

edit: Upon closer inspection, the state field shows up but then quickly disappears.

 

IE is also not showing the top menu. From what I read months ago that is because there is a maximum number of CSS files IE will recognize. That wasn't that big of a deal but THIS problem IS a BIG deal. Is there a workaround I can do to force it to show up in authentication.tpl?

 

version 1.4.5

prestashop new theme.

Link to comment
Share on other sites

Thanks Mike!

 

The solution is...

 

 

 

In your_shop/themes/your_theme/authentication.tpl

 

At the line 33 until 35 replace:

countries = new Array();

countriesNeedIDNumber = new Array();

countriesNeedZipCode = new Array();

 

with

 

var countries = new Array();

var countriesNeedIDNumber = new Array();

var countriesNeedZipCode = new Array();

 

Also many thanks to Augustin NIASSY for posting the fix.

Link to comment
Share on other sites

  • 5 months later...

I am having the same problem - I have check the back office field values for the country (note: changing this doesnt change my address form page fields)

 

I also have tried the vars on lines described below for authentication.tpl and address.tpl and that doesnt help.

 

This is a major probelm I was just alerted to and need to fix asap. Any other suggestions?

 

I am going to upgrade from version PrestaShop 1.4.1.0 to the newest one soon, but I really need this fixed asap since it is costing $$. HELP!

Link to comment
Share on other sites

It worked for me. I'm not sure what you did in address.tpl, but if you typed var in front of the lines indicated in the fix for authentication.tpl residing in your theme area, it should be fixed for IE. Afterware, make sure you go to Preferences/Performance and change Force Compile to Yes and Cache to No temporarily and hit reload on your store. Then change them back. If it still doesn't work in IE, delete the browser cache and try again.

Link to comment
Share on other sites

I noticed that address.tpl has the same lines without the var as authentication.tpl. Registration with 1 address works.

 

Adding or updating an address is where this fails. domain/address is the URL that I am seeing the error which is why I was reviewing the contents of that file as well.

 

I tried adding the var to both files, cleared the back office cache and I am still not seeing the state field in IE, FF nor Chrome. When I do a view source though the select html code is there as is the javascript.

 

Strange.......any additional thoughts?

Edited by jennywill (see edit history)
Link to comment
Share on other sites

Mine works fine in IE 10; I don't have any older versions around. The only thing that struck me was that my addresses.tpl in the theme area has no lines at all like the ones in authentication.tpl. If it's me, I'd grab a plain vanilla addresses.tpl from the prestashop theme, rename the file in my current theme and see what happened with the plain vanilla file.

Link to comment
Share on other sites

addresses.tpl doesnt have the same lines but address.tpl does at about lines 58-60. Do you see the same thing in your address.tpl? The functionality at domain/addresses works.

 

Ugh........I hope I can find this solution. Any other thoughts ideas are appreciated. There is probably something simple I am overlooking. Thanks!

Edited by jennywill (see edit history)
Link to comment
Share on other sites

Something really strange - as I mentioned that I was going to upgrade, I have the same a version of PrestaShop™ 1.4.1.0 a on my test site,and the states work there and when I compare the address.tpl, authentication.tpl, and statesmanagement.js and all the config they are all the same. Weird, This leads me to believe that there is something going on with my BO config. hmmmm......

Edited by jennywill (see edit history)
Link to comment
Share on other sites

  • 1 month later...

What a headache this has been.. It looks like it's only an issue on <IE7 browsers. I added 'var' in the following locations to fix this-

 

your_shop/themes/your_theme/authentication.tpl

(should be)

var countries = new Array();

var countriesNeedIDNumber = new Array();

var countriesNeedZipCode = new Array();

 

your_shop/themes/your_theme/address.tpl

(should be)

var countries = new Array();

var countriesNeedIDNumber = new Array();

var countriesNeedZipCode = new Array();

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

It's NOT an IE issue.. I've had the same problem with customers using chrome and firefox.

 

I did find out that the problem occurs only during "Express Checkout", so as a temp fix, I removed that option. Just goto paypal module and remove Express 3 click option.

Link to comment
Share on other sites

  • 2 weeks later...

I found this solution (added to the var one):

 

go to su domain.com/theme/default/js/statesManagement.js comment this line (nr.36):

[to comment put // before the word "console"]:

 

Before:

console.log($('select#id_

state'+(suffix !== undefined ? '_'+suffix : '')+' option:not(:first-child)'));

 

After:

 

//console.log($('select#id_

state'+(suffix !== undefined ? '_'+suffix : '')+' option:not(:first-child)'));

 

it works for me! Happy to share!

 

Luca.

Link to comment
Share on other sites

×
×
  • Create New...