Jump to content

"state" field is missing on account page


Recommended Posts

I've upgraded to v1.4 as I was hoping Canadian taxes would work better in this version. On the account sign up page, no state field shows up though Prestashop does come up with an error message that the state is required for this country. I am using the default theme. I have checked the back office, and the zones, country (Canada), and States are all configured correctly to the best of my knowledge. The only thing I changed is to rename zone US to zone North America since the US is a country, not a zone.

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Has anyone solved this glaring issue yet?

For the life of me I can't figure this out... and I'm surprised that with all of the open threads on no states in checkout that no one has solved this yet.

please help!!

Link to comment
Share on other sites

  • 1 month later...

I had same issue in speedy check out only.. but both I think work off the same java file. I first backed up my file before I did this change, then I changed my themes>theme name file>js>tools>statesManagement.js file to this code you see below and wa la it worked perfectly! :

$(document).ready(function(){
   $('select#id_country').change(function(){
       updateState();
       updateNeedIDNumber();
   });
   updateState();
   updateNeedIDNumber();
});

function updateState()
{
   $('select#id_state option:not(:first-child)').remove();
   var states = countries[$('select#id_country').val()];
   if(typeof(states) != 'undefined')
   {
       for (indexState in states)
       {
           //ie bug fix
           if (indexState != 'indexOf')
               $('select#id_state').append(''+states[indexState]+'');
       }
       $('p.id_state:hidden').slideDown('slow');
   }
   else
       $('p.id_state').slideUp('fast');
}

function updateNeedIDNumber()
{
   var idCountry = parseInt($('select#id_country').val());

   if ($.inArray(idCountry, countriesNeedIDNumber) >= 0)
       $('fieldset.dni').slideDown('slow');
   else
       $('fieldset.dni').slideUp('fast');
}

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...