+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: Add commas to the price input field

Hybrid View

  1. #1

    Add commas to the price input field

    Hello!

    How can I add commas to the price input field while I am typing the price range in the search form? ie.: $10,000,000

    Thanks!

  2. #2
    me too wanting to know this. Is this achievable

  3. #3
    How can we implement something like this:

    http://jsfiddle.net/2LAcj/

    Or another method to accomplish the same result?

  4. #4
    I also found this code here it might give some idea how to implement this:
    http://jsfiddle.net/yWTLk/348/

  5. #5
    so I guess its not possible then?

  6. #6
    Hello All,

    Upload file price format to js files and connect it.

    And also add this code:

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

  7. #7
    Hi Viktor,

    Thank you for getting back to us. I have uploaded the file and called it by adding the code in header.tpl of my template folder:

    <script type="text/javascript" src="{$rlTplBase}js/price_format.js"></script>
    I also added your code in footer.tpl of my template before the </body>

    <script type="text/javascript">
    {literal}
    $(document).ready(function(){
    $('#field_id').priceFormat({
    prefix: '',
    thousandsSeparator: ',',
    limit: false,
    centsLimit: 0,
    centsSeparator: ''
    });
    })
    {/literal}
    </script>
    I saved and check but nothing happened. Did i do something wrong?

  8. #8
    Because you should set original field id instead of: field_id
    Viktor,
    Flynax technical department,
    Best wishes.

  9. #9
    Quote Originally Posted by Viktor View Post
    Because you should set original field id instead of: field_id
    Hi Viktor,

    I have changed the following code in footer.tpl, but still no effect.

    <script type="text/javascript">
    {literal}
    $(document).ready(function(){
    $('price').priceFormat({
    prefix: '',
    thousandsSeparator: ',',
    limit: false,
    centsLimit: 0,
    centsSeparator: ''
    });
    })
    {/literal}
    </script>
    Also tried this:
    <script type="text/javascript">
    {literal}
    $(document).ready(function(){
    $('#price').priceFormat({
    prefix: '',
    thousandsSeparator: ',',
    limit: false,
    centsLimit: 0,
    centsSeparator: ''
    });
    })
    {/literal}
    </script>

  10. #10
    Hello Wei Hong,

    Are you sure with id for your price field? Is it 'price'?
    try to use:

    Code:
    Only registered members can view the code.
    because your price field doesn't have any ids.
    Viktor,
    Flynax technical department,
    Best wishes.

+ Reply to Thread