Joe Germann Posted August 10, 2010 Share Posted August 10, 2010 When a new users sets up an account the order of data entry is Zip, City, Country, State which may be how it is done in some countries but here in the US we tend to think in City, State, Zip, Country order.How can I change the order of data entry? What module controls this?Thanks,Joe Link to comment Share on other sites More sharing options...
mytheory. Posted August 10, 2010 Share Posted August 10, 2010 Hi,There is no module that allows you to change this order. You would have to modify a tpl file... off the top of my head I believe you need to edit themes/prestashop/address.tpl.I am using One Page Checkout so my code might (probably is) different from yours, and I am about to get off work so I don't have time to test this today, but try the following:Around line #71 of this file move this block of code: {l s='Country'} {$countries_list} * To below the block of code below it... the above should be below this block of code (by default around line 76): {l s='State'} - * Like I said I don't have time to test this, but this change should get you the right order of City, State, Country.Let me know if it doesn't work and I'll try to take a look tomorrow.HTH! Link to comment Share on other sites More sharing options...
Joe Germann Posted August 11, 2010 Author Share Posted August 11, 2010 HTH,I made those changes in address.tpl AND in authenticate.tpl and it did not change a thing with respect to the order of the table entries. I did a little more looking around and it looks like ../js/order-address.js might be the module that does that. I am not smart enough about how all this stuff works to know for sure but it looks like the order of display is formed here.What do you think?Thanks for your help,Joefunction updateAddressDisplay(addressType){ var idAddress = $('select#id_address_' + addressType + '').val(); $('ul#address_' + addressType + ' li.address_company').html(addresses[idAddress][0]); if(addresses[idAddress][0] == '') $('ul#address_' + addressType + ' li.address_company').hide(); else $('ul#address_' + addressType + ' li.address_company').show(); $('ul#address_' + addressType + ' li.address_name').html(addresses[idAddress][1] + ' ' + addresses[idAddress][2]); $('ul#address_' + addressType + ' li.address_address1').html(addresses[idAddress][3]); $('ul#address_' + addressType + ' li.address_address2').html(addresses[idAddress][4]); if(addresses[idAddress][4] == '') $('ul#address_' + addressType + ' li.address_address2').hide(); else $('ul#address_' + addressType + ' li.address_address2').show(); $('ul#address_' + addressType + ' li.address_city').html(addresses[idAddress][5] + ' ' + addresses[idAddress][6]); $('ul#address_' + addressType + ' li.address_country').html(addresses[idAddress][7] + (addresses[idAddress][8] != '' ? ' (' + addresses[idAddress][8] +')' : '')); // change update link var link = $('ul#address_' + addressType + ' li.address_update a').attr('href'); var expression = /id_address=\d+/; link = link.replace(expression, 'id_address='+idAddress); $('ul#address_' + addressType + ' li.address_update a').attr('href', link);} Link to comment Share on other sites More sharing options...
mytheory. Posted August 11, 2010 Share Posted August 11, 2010 Hey I got a few questions first...I should have asked this before, but I changed some of my settings and didnt realize it until now.Do you want the customer to be able to choose other countries? From the looks of it (from what I remember), PS displays the "State" entry box only after a certain "Country" is chosen. Honestly, I don't know what other countries use states... but for this purpose, when you choose "USA" as the country, only then is the state option visible. So what I am getting at is I don't think you can have the state option appear without the right country being selected. However, I imagine you can make the state option visible for all countries (whether they have states or not)... essentially, making the "State" option always visible and not reliant upon what "Country" is selected. If you aren't concerned about other countries then you could hide that option and make the "State" option always visible... but you would be limiting your customer base so I don't think its a good idea to only limit registrations to the US. (These ideas are only off the top of my head.)Just to clarify, you are talking about the registration form (where the customer inputs their info) and not moving the address orders in the emails or invoices, right?I don't know if you've done this yet... but I have mine setup like such. I made "USA" my default country... so when somebody goes to register/checkout by default the USA country option is selected and the State option is already there. So for my biggest customer base (the US) its more convenient as they don't have to select their country, but still giving other customers from other countries the option to change to their country. Like I said I don't know if you have tried this yet... but to set the default country: Go to the "Shipping" tab, then click on "Countries" at the top (below the tabs bar), and then scroll to the bottom... you should notice an option for setting your default country.Let me know how this works out for you.HTH! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now