• 30-07-2020, 15:01:34
    #1
    Merhabalar arkadaşlar.
    function fiyatguncelle()
    {
    var fiyat="";
    var fiyatalan=$(".woocommerce-variation-price .wcpbc-price .woocommerce-Price-amount").html();
    if($(".woocommerce-variation-price .wcpbc-price .woocommerce-Price-amount").length)
    {
    fiyat=$(".woocommerce-variation-price .wcpbc-price .woocommerce-Price-amount").html().split(";")[1].replace(",",".");
    }else{
    fiyat=resimattr.fiyat;
    }
    var width=$("#width").val();
    var height=$("#height").val();
    var mt=$("input[name='quantity']" ).val();
    $("#mt").html("="+mt+" m²");
    var kagitFiyatSon=$("#kagit_tipi").val();
    $("#tfiyat").html((parseFloat(mt)*fiyat+Number(kagitFiyatSon)).toFixed(2) +"₺");
    }
    burada çıkan çıktıyı yani tfiyat'ı nasıl php de bir fonskiyon içinde gösterebilirim?

    göstermek istediğim fonksiyon
    function return_custom_price($price, $product) {
    global $post, $blog_id;
    $price = get_post_meta($post->ID, '_regular_price');
    $post_id = $post->ID;
    $price = ($price[0]+"ÇIKTIYI GÖSTERECEĞİM ALAN");
    return $price;
    }
    add_filter('woocommerce_get_price', 'return_custom_price', 10, 2);
  • 30-07-2020, 15:08:09
    #2
    PHP & Flutter & Laravel
    Jquery kullanarak Ajax yardımıyla yapabilirsiniz
  • 30-07-2020, 15:18:05
    #3
    örnek yazabilirmisiniz hocam
  • 30-07-2020, 15:26:17
    #4
    Ajax ile ciktiyi php'ye post edebilirsiniz
  • 30-07-2020, 17:31:54
    #5
    @WebKadir; hocam ajax ile nasıl post edeceğimi bilmiyorum. yardım eder misiniz?
  • 30-07-2020, 18:40:46
    #6
    TufanKeles adlı üyeden alıntı: mesajı görüntüle
    @WebKadir; hocam ajax ile nasıl post edeceğimi bilmiyorum. yardım eder misiniz?
    $.ajax({
    type: "POST",
    url: "ajax.php",
    data: "gonder=" + gonderilecekdata,
    success: function(response){

    }
    });