Jump to content

States dropdown missing in Addresses


Recommended Posts

I've found many people reporting similar problems, but haven't found a solution yet.  So here's my dillema:

When a customer goes to create an account, I am requiring a state for all countries that have states (primarily US, but others as well).  However, the state drop-down box is not being populated and I can't figure out why.

 

Currently running PrestaShop 1.6.0.14

Current theme: Leo Book Theme (Leo Theme has been one of the most amazing themes I've used.  I highly recommend them.)

 

(Other consideration: My Postal-code box was not displaying either, but I was able to add some javascript to make it visible.  Not sure if it's related to populating this or not as I never found the source of it being hidden.)

 

Here's the authentication.tpl code that goes over the state box.  It hasn't been modified in any way of which I'm aware.

{elseif $field_name eq "State:name"}
  {assign var='stateExist' value=true}
  <div class="required id_state select form-group">
    <label class="control-label col-sm-4" for="id_state">{l s='State'} <sup>*</sup></label>
    <div class="col-sm-6">
      <select class="form-control" name="id_state" id="id_state"  >
        <option value="">-</option>
      </select>
    </div>
  </div>
{/if}

I've made sure that my states are all configured properly and that the US is correctly marked "Contains states".  Is there anything else that I'm missing here?

 

I am seeing a few errors that say: "Mixed Content: The page at 'https://shop.shop.com..." was loaded over HTTPS, but requested an insecure image/script/file This content should also be served over HTTPS."  Could this be causing my problem?

 

Link to comment
Share on other sites

The country and states are loaded via javascript, so yes it is possible that the mixed content error you are receiving is causing this problem.

 

I would suggest disabling https and try it again and see if it works.  If it does, then you need to determine what files are causing the mixed content issue and fix them.

 

Since you are using a LEO theme, and this appears to be a theme issue, then I would suggest you reach out to them directly for support

Link to comment
Share on other sites

Well, one of the issues is that we are using the Authorize.Net module for payments.  This module doesn't work UNLESS you have https enabled.  However, I went through and disabled it and it still doesn't show the states when SSL is disabled.  Anyone else have any ideas?

Link to comment
Share on other sites

Well, one of the issues is that we are using the Authorize.Net module for payments.  This module doesn't work UNLESS you have https enabled.  However, I went through and disabled it and it still doesn't show the states when SSL is disabled.  Anyone else have any ideas?

after you disabled SSL, did you confirm there were no javascript errors?

Link to comment
Share on other sites

No, it still has the same javascript errors as well.  Here's the listing...

 
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
jquery-1.11.0.min.js:4 Uncaught SyntaxError: Unexpected token <
jquery-ui-1.8.22.custom.min.js:5 Uncaught TypeError: Cannot read property 'ui' of undefined
framework.js:62 Uncaught TypeError: Cannot read property 'noConflict' of undefined
address:119 Uncaught TypeError: $ is not a function
address:156 Uncaught TypeError: undefined is not a function
address:478 Uncaught TypeError: $ is not a function
address:490 Uncaught TypeError: Cannot read property 'fn' of undefined
address:794 Uncaught TypeError: undefined is not a function
address:928 Uncaught TypeError: undefined is not a function
tools.js:609 Uncaught TypeError: $ is not a function
https://video-atl3-1.xx.fbcdn.net/hvideo-xtf1/v/t42.1790-2/11863525_1020664…MTI1NX0%3D&rl=460&vabr=256&oh=25b2007954ab081c0c2d580cbe43ce16&oe=55E9F65C Failed to load resource: the server responded with a status of 400 (Service Worker Fallback Required)
 
I've checked on the files and they are all where they are supposed to be.  I even redownloaded the jquery-1.11.0.min.js to make sure it wasn't corrupt.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...