-
AuthorPosts
-
January 20, 2011 at 6:14 am #159033
Hi there,
I have an extra field named Location which holds the k2 items city.
Since there are many cities in this project it would be crazy to enter in every single city.
Therefore only the required ones are entered in the k2 extra fields drop-down selection.
For Example:
City A
City D
City EThis is easy to setup initially as having the order correct. However, if later on I need another city that is before City E then the city order is no longer alphabetical.
For Example:
City A
City D
City E
City BMy question is, how can I re-order this options in the JA K2 Search module to be alphabetical again whilst retaining the correct City value?
thuanlq Friendthuanlq
- Join date:
- October 2010
- Posts:
- 528
- Downloads:
- 0
- Uploads:
- 29
- Thanks:
- 8
- Thanked:
- 121 times in 99 posts
January 22, 2011 at 9:09 am #373145Dear @virteer,
Currently, ja k2 search module show k2 extra fields drop-down as it is, without the alphabetical ordering. However you can make it work by yourself, please do as following:
– Open “default.php” file in folder “modulesmod_jak2_filtertmpl”.
– Change line code
switch ($extrafield->type){
...
case 'select':
...}
to
switch ($extrafield->type){
...
case 'select':
/*Added there lines code to sort by alphabe*/
if(!empty($extrafield->options))
{
$tmpArray = array();
$array = array();
$options = array();
foreach($extrafield->options as $item)
{
$tmpArray[] = $item->text;
$array[$item->text] = $item;
}
sort($tmpArray);
foreach($tmpArray as $item)
{
$options[] = $array[$item];
}
$extrafield->options = $options;
}
/*End updated*/
...}
1 user says Thank You to thuanlq for this useful post
January 27, 2011 at 12:54 pm #374076Thankyou Thankyou Thankyou!!! 😀
I tried for days to do this. It’s all about the syntax!
Excellent work 🙂
kbrookes Friendkbrookes
- Join date:
- March 2006
- Posts:
- 16
- Downloads:
- 19
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
October 9, 2013 at 8:09 am #508457Hi there,
Will this method work in the current version of the module?
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
October 10, 2013 at 6:46 am #508560October 10, 2013 at 2:34 pm #508611Hi,
there is a solution for the last version (2013)?
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
October 11, 2013 at 4:32 am #508687rsystems Friendrsystems
- Join date:
- July 2012
- Posts:
- 118
- Downloads:
- 0
- Uploads:
- 7
- Thanks:
- 41
- Thanked:
- 7 times in 1 posts
October 11, 2013 at 8:38 am #508722<em>@Luna Garden 393194 wrote:</em><blockquote>The new one is so different from previous and it takes time, please wait for the upcoming version.</blockquote>
Can you add this feature to http://pm.joomlart.com/browse/JAK2FILTER ?
Would like to see this in next version!
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
October 14, 2013 at 3:45 am #508865Yes, we’ve already lined up this feature in our system and it will be added in upcoming version.
You can follow its status here: http://pm.joomlart.com/browse/JAK2FILTER-119
1 user says Thank You to Luna Garden for this useful post
rsystems Friendrsystems
- Join date:
- July 2012
- Posts:
- 118
- Downloads:
- 0
- Uploads:
- 7
- Thanks:
- 41
- Thanked:
- 7 times in 1 posts
October 15, 2013 at 7:11 am #509016Just a note: for me, 118 is the latest issue visible. pm.joomlart.com/browse/JAK2FILTER-118
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
October 22, 2013 at 2:17 am #509773Hello,
Please check again, I have re-created this issue: http://pm.joomlart.com/browse/JAK2FILTER-119
1 user says Thank You to Luna Garden for this useful post
jornaldasviagens Friendjornaldasviagens
- Join date:
- July 2013
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
December 19, 2013 at 4:53 pm #515980Well, i seem to have the opposite problem.
The extrafilelds are listed in alpabethical order and i need to set then in the order i create them.
What can bee wrong?
I appreciate your attention
JV
-
AuthorPosts
This topic contains 12 replies, has 7 voices, and was last updated by jornaldasviagens 10 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum