Is there anyway if we can add number separator when typing on our flynax site?
In number listing field when we add new listing or search for listing. For number such as 10000000. It would be great if we has 10,000,000 when we type. THank you
Printable View
Is there anyway if we can add number separator when typing on our flynax site?
In number listing field when we add new listing or search for listing. For number such as 10000000. It would be great if we has 10,000,000 when we type. THank you
Hello Wei,
Where do you need the separator? In listing fields when you add a new listing or in some other place? Please describe where do you need it exactly.
hello add a new listing :s
Hello Guys,
Try to do it yourself.
Open file: ftp://templates>>your_template>>js>>lib.js
at line ~116
find code: var media_query = 'desktop';
above add new code: https://raw.githubusercontent.com/cu....number.min.js (copy all code from this url and past to lib.js)
Then find code:
and replace to:Code:Only registered members can view the code.
save and check again.Code:Only registered members can view the code.
PS: If you don't sure you can add it yourself send ftp access to my PM I will add it on your site
thank you viktor
Dear Viktor,
This is a much simpler solution than the first time. I have tried it and the separator shows fine. But again, it messed up with the search engine. For example for a listing that have a price 200,000. When I added the code and input min price 200,000. It shows all listings including 100,000 for price. And for max i inpute 200,000 it shows none listing. So I think after implemented the code. Flynax search think that your min and max is 0. That is why it shows all listing if you input any number in min, leave max blank. And show none listing when you input number in max and leave min blank.
Hello Wei,
If you want I can check it on your side. Because for me all ok.
hello viktor There is a mistake in the dot
Attachment 2469
hello viktor There is a mistake in the dot
Attachment 2469
Hello Yakup,
Yes you are right problem was in create method of listings.
Open file: ftp://includes>>classes>>rlListings.class.php find method: 'create' and code:
and replace to:PHP Code:
Only registered members can view the code.
then in method: 'edit' find code:PHP Code:
Only registered members can view the code.
and replace to:PHP Code:
Only registered members can view the code.
save and try to create or edit listing again.PHP Code:
Only registered members can view the code.
Thank you Viktor :rolleyes:
hello viktor Punctuation added to phone field
Attachment 2475
hello viktor Punctuation added to phone field
open file: ftp://templates>>your_template>>js>>lib.js
find line:
orCode:Only registered members can view the code.
and replace to:Code:Only registered members can view the code.
Code:Only registered members can view the code.
hello viktor .
How do we do for mobile and business phone
When you create new phone field in line 'Key' you should use word: 'phone' and any additional words.
$('.numeric').numeric().not('[name*=phone]')('[name*=istel]').number(true);
Hello Yakup,
Not exactly. Use my code:
Code:Only registered members can view the code.
thankyou viktor:)
Hello viktor, did not work after updating
Hi Viktor,
After update to 4.6.1 in lib.js file in template
The new function is:
It used to be in 4.6Quote:
$('.numeric').numeric({
decimal: rlConfig['price_separator']
}).number(true);
The problem is it still add separator like 0,000,000 ok. But search wont work. If I have a listing price 600 and I use 6,000 as "from" and leave "to" price blank in search box. It show the 600 listing. If I put 700 in "from" it shows none listing which is correct. So I think flynax consider a number with separator added by your method as a zero 0Quote:
$('.numeric').numeric().number(true);
the problem continues
Hello Yakup,
I suggest you create a ticket with the problem.
Hello Yakup,
I think somebody added this dot manually, Please try to edit this listing into Admin Panel. And you will see manually added the dot.
Hi Viktor,
The one in admincp is called Separator symbol in prices, in basic setting > listing
This one show separator in price field.
But the one you taught us in this thread is add separator while typing in search field or listing field. Like typing 1000000. It automatically added separator so it become 1,000,000. The one in admincp only show separator after we submit listing. Not while we typing.
Hello Wei Hong,
Open file: ftp://includes>>classes>>rlSearch.class.php find method: search
and code:
and replace to:PHP Code:
Only registered members can view the code.
save and check again.PHP Code:
Only registered members can view the code.
Hi Viktor,
Is there anyway if we could make the method that you taught us earlier to work in 4.6.1?
Your method is here:
http://forum.flynax.com/showthread.p...ll=1#post18941
I think it is the best one so far because it works on all number fields.
Quote:
In 4.6 version the code is
$('.numeric').numeric();
Quote:
Now in 4.6.1 it is:
$('.numeric').numeric({
decimal: rlConfig['price_separator']
}).number(true);
Hello Viktor. Can you post correct code to board when finish please. So we can benefit from such mods
Hello Wei Hong,
Did you try to implement this instruction in your 4.6.1?
Yes Viktor,
I did it in 4.6 and it worked perfectly. In 4.6.1, I repeat it
First of all I did this again
Then in the following step:Quote:
Try to do it yourself.
Open file: ftp://templates>>your_template>>js>>lib.js
at line ~116
find code: var media_query = 'desktop';
above add new code: https://raw.githubusercontent.com/cu....number.min.js (copy all code from this url and past to lib.js)
I could not findQuote:
Then find code:
Code:
$('.numeric').numeric();
and replace to:
Code:
$('.numeric').numeric().number(true);
save and check again.
But I foundQuote:
$('.numeric').numeric();
I think in 4.6.1 they changed to this. So I replace all above withQuote:
$('.numeric').numeric({
decimal: rlConfig['price_separator']
});
And the separator shows OK on all number field in listing adding page, search page, etc. But the problem is in search box Price "from" and "to" it does not work properly. I have 3 listings with price as follow:Quote:
$('.numeric').numeric().number(true);
Listing 1: $1,000
Listing 2: $2,000
Listing 3: $3,000
If I put $2,000 in the box "from" of listing field price in search box. It shows all 3 listings. I think it takes the number 2,000 as 0, so it show all listings because it think I want to find price starting from $0, not $2,000. Before in 4.6 after your method, input 2,000 and it only show listing 2: $2,000 and listing 3: $3,000.
So I remove the code and everything back that doesn't have separator, I input 2000 in listing field price. It now shows correctly only 2 listings start from price $2000.
I think I must change something with this code, but I don't know how
Quote:
$('.numeric').numeric({
decimal: rlConfig['price_separator']
});
Hello,
I suggest that you create a ticket to look into search problem