Results 1 to 5 of 5

Thread: Change order of countries in select field

  1. #1
    User
    Join Date
    04-10-11.
    Posts
    162

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

  2. #2
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default 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?

  3. #3
    User
    Join Date
    04-10-11.
    Posts
    162

    Default 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

  4. #4
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default 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

  5. #5
    User
    Join Date
    04-10-11.
    Posts
    162

    Default Re: Change order of countries in select field

    Thanks, that's a massive help!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •