mr913 Posted June 15, 2011 Share Posted June 15, 2011 I upgraded a while back from 1.3.? to 1.4.1.My site has been in progress for a while, so after the upgrade I kept working on products etc, but never realized the checkout process was broken. It's broken because when selecting the US, there aren't any states available!?Hitting save gives an error that says: There is 1 error(s):This country requires a state selection.But there's no place to select a state!?I have verified settings in Countries, zones, states. I have done the automatic update under localizations.I have uploaded new authentication.tpl, etc. where I had deleted the birthday line. I have deleted my cache/compile contents under tools/smarty using FTP (this fixed an issue earlier with the birthday line, which was a PITA to delete).In the forum there are about 5 or 6 various threads on this topic. None have been solved, all have the same general theme -> after upgrade, no states dropdown selection.Thanks in advance for your assistance. (see attached screen shot to see that states are missing (yes, even with all other fields filled in it's still missing.)) Link to comment Share on other sites More sharing options...
Zenith Posted June 16, 2011 Share Posted June 16, 2011 Have you checked on the BO Country edit page that 'Contains states' is set to Yes for the US? Link to comment Share on other sites More sharing options...
mytheory. Posted June 16, 2011 Share Posted June 16, 2011 Just quickly going off of the screenshot... it's weird that your country says "United States." I'm using v1.4.2.5 and previously v1.2.5 and on both versions the country says "USA". So I'm thinking you might have created another Country and didn't set the states correctly as Zenith mentioned.HTH! Link to comment Share on other sites More sharing options...
shokinro Posted June 16, 2011 Share Posted June 16, 2011 ” I’m using v1.4.2.5 and previously v1.2.5 and on both versions the country says “USA”. Actually in 1.3x by default, it is USA and in 1.4x by default it is "United States".I think you need to check if there the are both records "USA" and "United States". If yes, remove one of them.Make sure you have the state linked to the country.(I am sure the "United States" country has a setting "contains" state.You can check it at back office "Shipping" tab - Countries tab and States tab. Link to comment Share on other sites More sharing options...
mr913 Posted June 16, 2011 Author Share Posted June 16, 2011 I have the "United States" (default) and then I also created "United States of America" and assigned a few states to it. Both are set to contain states. Still no luck. There were a few bugs opened in the bug tracker that seem to be the same thing, but they were closed, without much as to an answer. I've spent about 8 hours yesterday just on this problem with no luck. I've enabled other countries with states with no luck. I've enabled other countries, assigned states, set them to containing states, with no luck... Hopefully this info helps. Thanks for the replies. Link to comment Share on other sites More sharing options...
mr913 Posted June 16, 2011 Author Share Posted June 16, 2011 OK. After a LOOOONG time of screwing around with every setting imaginable, I figured out how to fix it...If I change the settings to Use Smarty 2 instead of Smarty 3 it fixes the problem and states FINALLY show up. But what is Smarty? It says if my theme isn't compatible use Smarty 2, but my theme is the default. Shouldn't it work? Is Smarty 2 or 3 a setting on my server? 1 Link to comment Share on other sites More sharing options...
shokinro Posted June 16, 2011 Share Posted June 16, 2011 I am glad you figure it out by yourself and found a solution. thanks for sharing.Smarty is a tool that compile your theme files into classic PHP script so that.Smarty make it possible for us to separate the logic (PHP) and theme file TPL file.You problem means that your theme is not compatible with smarty 3.I guess it is theme that you used in 1.3x and upgraded to 1.4x Link to comment Share on other sites More sharing options...
mr913 Posted June 16, 2011 Author Share Posted June 16, 2011 I was just using the default theme with 1.4.2.5. I haven't really modified anything and when I upgraded I abandoned the old theme completely. Although I'm still not exactly sure how it got messed up, but I deleted the birthday code. When I deleted it the first time I left a few lines of blank code so if I needed to add it back, I'd know where it went. Other than that, they were as they came. Another thing that changed once I got it working was that in Customers->carts I now have a delete option icon. Before I didn't have this ability and I had been searching for how to delete them since I had over 300 records listed that were mostly me playing around.But in the end, it was fixed by re-uploading the Prestashop theme, and the smarty folder, and clearing all of the smarty cache. Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted July 21, 2011 Share Posted July 21, 2011 I had same issue and checked all that.. was not the issue.. found a better solution which got it to work perfectly now version 1.3.6 for this site. First back up the statesManagement.js file before changing it..(see below for path) then..I changed my themes>theme name file>js>tools>statesManagement.js file to this: $(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'); } 2 Link to comment Share on other sites More sharing options...
Recommended Posts