• Resolved alphanos

    (@alphanos)


    Hello
    I am using free version of plugin.

    My veraible name :_satilikevler_fiyat
    If I use like this
    <?php echo do_shortcode( ‘[wpcs_price meta_value=_satilikevler_fiyat ]’ ); ?>

    Result for price : € 345,000,00 (EUR) I Like remove last two zero
    //////////////////////////////////////////////////
    I try to like this
    $fiyat = get_post_meta( get_the_ID(), ‘_satilikevler_fiyat’, true );
    $price= number_format($fiyat,0, ‘.’, ‘,’);
    1:<?php echo do_shortcode( ‘[wpcs_price value=”‘.($price).'”]’ ); ?>
    Price result :€ 345,00 (EUR) (It must be € 345,000 (EUR)) one zero is missing
    But if ı check with echo price like this <?php echo $price?> price result is correct and result :345,000
    ///////////////////////////////////////////////////////////
    Also i tried another way like this
    $fiyat1 = get_post_meta( get_the_ID(), ‘_satilikevler_fiyat’, true );
    <?php echo do_shortcode( ‘[wpcs_price value=”‘.number_format($fiyat1, 0, ‘.’, ‘,’).'”]’ ); ?>

    Price result: € 345,00 (EUR)

    ////////////////////////////

    Can you help me please.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Remove Decimal and make integer price’ is closed to new replies.