Home Forums GetFund – A Professional Laravel Crowdfunding Platform numeric format and display problem

  • #1236

    Daffson
    Participant

    659

    numeric format and display problem

    Hello, the problems are obvious from the picture.
    I’m also interested in how to set the numeric format. Now this 1,000.00 is used but it is not acceptable for Europe. Here is used 1.000,00 / so backwards than now. I also miss the option of setting the number of decimal places – it is useless to display tenths for our currency.
    pic: https://prnt.sc/il1z1w

Viewing 8 replies - 1 through 8 (of 8 total)
  • #1241

    Daffson
    Participant

    Please answer to my problem.

    #1244

    Hi

    For the overlapping the pre defined price input, you have to fixed it by css, it’s best fit for 4 items, if you need more, then you should do it by css.

    Please see the price issue below.

    At the file /root/app/helpers.php Line number 201

    Find the below line

    $amount = number_format($amount,2);

    Replace it with below line

    $amount = number_format($amount,2, ',', '.');

    It will help you to solve thousand and decimal separator

    Best Regards

    #1247

    Daffson
    Participant

    When creating a campaign, the owner can enter more than 4 preset items. If the style does not support more than 4 entries – then the campaign creation should not support more than 4 items.
    My next suggestion is to add a numeric format setting to the administration. Setting the date format in the administration can be done and the numeric format has the same weight.
    As far as the question of currency is concerned, it remained unanswered. The currency in one place remains left, even if the administration is set to the right. See previous picture.

    #1259

    Daffson
    Participant

    No reaction?

    #1272

    Hi Daffson

    Could you please give me an example how to want you use currency. Example: $10.00 or 10$ or something else

    So I will change the code for you and provide you that code to replace an existing function.

    Best regards

    #1277

    Daffson
    Participant

    Hi Katherine,
    like this 500 Kč and for thousands 5.000 Kč

    #1297

    Hi

    At the file /root/app/helpers.php

    Line Number : 194

    Replace below code

    function get_amount($amount = 0){
        $show_price = '';
    
        $currency_position = get_option('currency_position');
        $currency_sign = get_currency_symbol(get_option('currency_sign'));
    
        if ($amount > 0){
            $amount = number_format($amount,2);
            if ($currency_position == 'right'){
                $show_price = $amount.' '.$currency_sign;
            }else{
                $show_price = $currency_sign.' '.$amount;
            }
        }else{
            if ($currency_position == 'right'){
                $show_price = '0.00 '.$currency_sign;
            }else{
                $show_price = $currency_sign.' 0.00';
            }
        }
    
        return $show_price;
    }

    With below code

    function get_amount($amount = 0){
        $show_price = '';
        $currency_position = get_option('currency_position');
        $currency_sign = get_currency_symbol(get_option('currency_sign'));
    
        if ($amount > 0){
            $amount = number_format($amount,0,',', '.');
            $show_price = $amount.' '.$currency_sign;
        }else{
            if ($currency_position == 'right'){
                $show_price = '0.00 '.$currency_sign;
            }else{
                $show_price = $currency_sign.' 0.00';
            }
        }
        return $show_price;
    }
    

    Then your expected format will show everywhere

    Best regards

    #1298
    This reply has been marked as private and you are not authorised to see.
Viewing 8 replies - 1 through 8 (of 8 total)

Purchase for access

Buy a copy of GetFund – A Professional Laravel Crowdfunding Platform for access to our member center.

Buy