-
AuthorPosts
-
jornaldasviagens Friend
jornaldasviagens
- Join date:
- July 2013
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
December 19, 2013 at 5:33 pm #193106I have JA K2 Filter installed in a Joomla 2.5.16 site, which is still being developed.
The problem is with extra-fields groups in modules.
I have one extra-field group that should be ordering the extra-fields by price, like:
prices from: 0 to 500; 501 to 1000; 1001 to 2000 and so now.
BUT instead of this logical price order the system mixes up the fields like this 0 to 500; 1001 to 1000; 500 – 1001….
I guess this is because data is being listed by alphabetical order and in the case by number increase order.
How can i manage to have prices in a increase order too?
I appreciate your attention.
Here with goes a printscreen of the mentioned problem
Regards!
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
December 20, 2013 at 4:53 am #516033Hello jornaldasviagens,
In JA K2 Filter, extra field will be ordered by character, and by number if extra field has number only.
With your case, extra field includes character, so It can’t be ordered by number anymore.
I think, you can change to use value range for this.
1. Set extra field type to Text Field, on K2 item, fill the value of price for this extra field.
2. In Module JA k2 filter, Set Type for this extra field is value range, set value Range like this: 0|500|1000|1500|2000jornaldasviagens Friendjornaldasviagens
- Join date:
- July 2013
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
December 23, 2013 at 1:37 pm #516304Hello Luna,
tnaks a lot for your reply. well that is an options yes, but my client is not satisfied. There is a gap from 500 to 1000 that won´t be used
The order i need is:
0 – 500 €
501 – 1000 €
1000 – 2500 €
2501 – 3000 €
Or
2501 € and moreDo you think this not possible?
Somehow change the code so that is doesn´t order by number and assume the order of the extrafields?
I appreciate your attention,
Regards
JLLuna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
December 24, 2013 at 4:55 am #516382jornaldasviagens Friendjornaldasviagens
- Join date:
- July 2013
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
December 24, 2013 at 12:19 pm #516421Hello Luna,
Thanks a lot for your reply. I not much of a coder…
i found line 202 sort($ranges,SORT_NUMERIC);
and as you sugested i changed it to:
sort($ranges,SORT_REGULAR);But it didn´t help.
Could you help?
thakz and merry Christmas
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
December 25, 2013 at 3:15 am #516454Hi JL,
First of all, Merry Christmas.
And the second, I’ll try explain what I said in previous post,
but please roll back what you did
<blockquote>you sugested i changed it to:
sort($ranges,SORT_REGULAR);</blockquote>Please go to file:
modulesmod_jak2filterhelper.php
Find this line:
@sort( $values, SORT_REGULAR );
in about line 422.
Comment out it, means, change above line to:
/*@sort( $values, SORT_REGULAR );*/
Hope you understand. If it doesn’t work, PM me your site URL, admin account and FTP account.
jornaldasviagens Friendjornaldasviagens
- Join date:
- July 2013
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
December 26, 2013 at 10:22 pm #516611Hello Luna,
well I thank you for your clear explanation about the “comment out”.
But the true is: my helper.php does not include the line you mention.
Maybe the attached copy of helper.php helps us to detect the problem.
Can we solve the problem with this file?
If not, i have to ask permittion to my client to share the logs.
Thankz a lot!
JL
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
December 27, 2013 at 7:09 am #516646Hi,
Sorry, I said the wrong file.
Please go to:
modulesmod_jak2filterhelper.php
and comment out this line (about line 377):usort($values, array($this, 'strcmp'));
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 28, 2013 at 6:39 pm #516758It Worked!
Thanks a lot Luna
JL
1 user says Thank You to jornaldasviagens for this useful post
AuthorPostsViewing 9 posts - 1 through 9 (of 9 total)This topic contains 9 replies, has 2 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
Jump to forum