• Anna
    September 4, 2014 at 11:20 am #74692

    Hi Agus

    You need to change the number format in PHP. By default it doesn’t support decimals. Only full numbers.

    First look for the property field in the theme files.

    Property Size:

    You have to look for $property[‘property_size’] = number_format($property[‘property_size’])

    in the entire theme and change the price format to French format (this is the link to the PHP documentation for price format) http://php.net/manual/en/function.number-format.php

    Ex:

    $property[‘property_size’] = number_format($property[‘property_size, 2, ‘,’, ‘ ”])

    Look for also something like this

    $property[‘property_size’] = intval ( get_post_meta($post->ID, ‘property_size’, true) );
    $property[‘property_lot_size’] = intval( get_post_meta($post->ID, ‘property_lot_size’, true) );

    Where you see

    intval

    Replace intval with floatval
    Floatval adds decimals.

    Property Lot size, the same, but the field name is different

    $property[‘property_lot_size’] = intval( get_post_meta($post->ID, ‘property_lot_size’, true));
    if ($property[‘property_lot_size’] != ”) {
    $property[‘property_lot_size’] = number_format($property[‘property_lot_size’]) .’ ‘.$measure_sys.’2‘;
    }

     

    All this must be done by manually changing code (don’t copy paste as formatting will be wrong).

    Hope it helps.

    Thanks
    Anna

    Paketo
    April 9, 2015 at 10:03 pm #105911

    I have created a custom field under the Theme Options to include the number of stories a property is. I have a property that is 1.5 stories. Where do I edit intval to floatval for this custom field?

    Thanks.

You must be logged in to reply to this topic.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.