• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Change the default country

Change the default country 10 years 4 days ago #27314

  • acc
  • acc's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi
Looking at the country list in the custom field of rsmem, the following code pulls the list

//<code>
$db = JFactory::getDBO();
$db->setQuery("SELECT name FROM #__rsmembership_countries");
return implode("\n", $db->loadColumn());
//</code>

Can anyone tell me where to find this list and is it possible to make a Ireland the default option that show.

Regards
Alan
The administrator has disabled public write access.

Change the default country 10 years 4 days ago #27320

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
The following user(s) said Thank You: acc

Change the default country 9 years 6 months ago #29064

Hi. I've read the documentation and the posted replies. Can someone provide the specific path where I find the file that contains this code to set the default country? I've done a multi-file search and have come up with nothing. Been at it awhile with no success. THANKS.
The administrator has disabled public write access.

Change the default country 9 years 6 months ago #29072

  • silviup
  • silviup's Avatar
  • OFFLINE
  • Moderator
  • Posts: 309
  • Thank you received: 49
Head to Components >> RSMembership! >> Custom Fields >> edit the 'country' field >> replace the code found in the 'Values' textarea with the following one:
//<code>
$db = JFactory::getDBO();
$db->setQuery("SELECT name FROM #__rsmembership_countries WHERE name NOT LIKE 'France'");
return "France\n".implode("\n", $db->loadColumn());
//</code>

Note that you need to replace 'France' with your country's name (it shows up twice in the code).

Basically, the code first skips pulling your country from the list and then adds it as the first selectable option in the dropdown, making it the default selection.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 9 years 6 months ago by silviup.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!