By Joey on Friday, 23 February 2018
Posted in Technical Issues
Likes 0
Views 372
Votes 0
The "Custom Field" called "Country" does no alphabetize the countries when "Dropdown" is selected as the "Selection Type"
Hi Joey,

Currently the 'Country' custom field is sorting the countries based on the ordering. Please see http://take.ms/pVaYV
If you need to sort by country' name, you can hack the Country field to sort by country' name. To do that, open the file 'JOOMLA/media/com_easysocial/apps/fields/user/country/helper.php' and locate below block of code at line 53:



$countries = FD::model('Regions')->getRegions(array(
'type' => SOCIAL_REGION_TYPE_COUNTRY,
'state' => SOCIAL_STATE_PUBLISHED,
'ordering' => 'ordering'
));



Replace the 'ordering' => 'ordering' to 'ordering' => 'name'.
Your code should look like below:



$countries = FD::model('Regions')->getRegions(array(
'type' => SOCIAL_REGION_TYPE_COUNTRY,
'state' => SOCIAL_STATE_PUBLISHED,
'ordering' => 'name'
));



Hope this help and have a nice day
Sam
·
Friday, 23 February 2018 13:46
·
0 Likes
·
0 Votes
·
0 Comments
·
My country screen looks different than yours.
I do not have the up and down arrows like your screen.

Also, in the backend, I number the countries in alphabetical order; but, there is no save button to save the new order.
·
Friday, 23 February 2018 14:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Joey,

To see the up / down arrow, you will first need to sort by the ordering column. To do this, click on the 'ordering' heading from the table listing. Please see http://take.ms/Z9fqA

You should then see the arrows.

>> Also, in the backend, I number the countries in alphabetical order; but, there is no save button to save the new order.

Currently you can only change the ordering by clicking on the arrows.

Hope this help and have a nice day
Sam
·
Friday, 23 February 2018 15:23
·
0 Likes
·
0 Votes
·
0 Comments
·
That should take me about a thousand clicks to arrange.

Anything coming soon regarding this issue?
·
Friday, 23 February 2018 15:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Joey,

I am sorry but currently this is the only way to adjust the ordering of the countries. Alternatively, if you need to sort the countries by the name, maybe you can consider to apply the hack from my previous message.


As will see if we can provide a better approach on sorting the ordering of the countries in the future release of EasySocial.
Anyway, thanks for your feedback and your suggestion are most welcome

Have a nice day
Sam
·
Friday, 23 February 2018 15:31
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post