+ Reply to Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: Add commas to the price input field

  1. #11
    I tried to replace with your suggest coded too but it still doesnt work. I check using inspect element and it shows the id of the price listing field is "sf_field_price" so I changed using the code

    <script type="text/javascript">
    {literal}
    $(document).ready(function(){
    $('#sf_field_price').priceFormat({
    prefix: '',
    thousandsSeparator: ',',
    limit: false,
    centsLimit: 0,
    centsSeparator: ''
    });
    })
    {/literal}
    </script>
    But it still doesnt work

  2. #12
    Would you please send me page where do you want it. I will check and try to solve it.
    Viktor,
    Flynax technical department,
    Best wishes.

  3. #13
    Thanks Viktor, message sent

  4. #14
    Hello Wei Hong,

    I found 2 errors with it:

    1. You should move <script src="your_site/scripts/tiengViet.js"></script><script>tiengViet.method=4; tiengViet.displayMode = 1</script>
    <script type="text/javascript" src="your_site/templates/FiLORSP/js/price_format.js"></script>
    40 lines below.

    Then use this code:

    Code:
    Only registered members can view the code.
    save and check again.
    Viktor,
    Flynax technical department,
    Best wishes.

  5. #15
    thanks Viktor, it works great now. But I notice that I cant no longer input cent. For example: $1.99 or $2.50. Only $199 or $250. I then went back to the example that I posted earlier and they are also can't input cent. Is there anyway that I can fix it?

  6. #16
    Also is there anyway if I can add this effect to the search box in search page as well?

  7. #17
    Hello Wei Hong,

    Please see in js code line: centsLimit: 0,
    set 2 and try again.
    Viktor,
    Flynax technical department,
    Best wishes.

  8. #18
    Member
    Join Date
    Jul 2016
    Location
    Iran
    Posts
    74
    Helloو

    I have several fields of price type.
    I used the codes as follows, but did not work.

    1) Uploaded the price_format.js in js folder in my template
    2) I added below code in footer.tpl of my template before the </body>

    PHP Code:
    Only registered members can view the code
    3) And also adding this code in header.tpl of my template folder( in line 58 before {rlHook name='tplHeaderCommon'}):
    PHP Code:
    Only registered members can view the code
    please guide me.
    Car sell in: BanBan.ir

  9. #19
    Senior Member
    Join Date
    Jun 2016
    Location
    New York
    Posts
    158
    Hi Mousa,

    let me see it here, please wait

  10. #20
    Senior Member
    Join Date
    Jun 2016
    Location
    New York
    Posts
    158
    First step:

    PHP Code:
    Only registered members can view the code
    Last edited by Ed; May 6, 2018 at 11:40 PM.

+ Reply to Thread