Change order of countries in select field
Hi,
is it possible to change the order that the countries appear in on the shipping and billing address forms?
I would like to move the UK to the top as 99% of customers using the site which I am building will be in the UK. I've had a look around the language files, to see if I can re-order them. Also I've tried altering the $arrCountries array in ModuleIsotopeCheckout.php so that gb is the first item, this appears to have no effect on the list.
Any ideas on how I can achieve this? Thank you.
Re: Change order of countries in select field
would it not be better to set the fields default to 'gb' in localconfig, so alphabetical order is still maintained?
Re: Change order of countries in select field
It sounds like it may be better indeed. I didn't know you could do this, what do I need to put in localconfig?
Will this just make all country select forms default to gb? Is there any documentation you can point me to which explains this? Thanks
Re: Change order of countries in select field
in system/config/dcaconfig.php (sorry, not localconfig)
Code:
$GLOBALS['TL_DCA']['tl_member']['fields']['country']['default'] = 'gb';
would change just the tl_members.country field to 'gb'.
So you need to identify the module table [tl_member] and field ['country'] you want to set a default to.
I can't tell you which sorry, as I don't know Isotope.
http://www.contao.org/custom-configurations.html
Re: Change order of countries in select field
Thanks, that's a massive help!