• 30-07-2021, 01:35:32
    #1
    Arkadaşlar stokta olmayan ürünler için sepete ekle kısmı yerıne bır stok sorun gıbı buton koymak ıstıyorum eklentı veya functions dosyası ile nasıl yapabiliriz .?
  • Kabul Edilen Cevap
  • 30-07-2021, 02:00:10
    #2
    Bu cevap, konu sahibi tarafından kabul edilebilir bir cevap olarak işaretlendi.
    Buna bir bakın hocam, sanırım işinize yarar.

    https://stackoverflow.com/questions/...n-out-of-stock
  • 30-07-2021, 02:16:44
    #3
    Merhaba, stok bittiğinde aktifleşeb stoğa girince haber ver gibi bir iletişim formu isterseniz önerebilirim.
  • 30-07-2021, 03:02:32
    #4
    Tşkler Çözüm Sağlandı ;
    /* Show contact form instead of "Out Of Stock" message */
    add_action('woocommerce_single_product_summary', 'out_of_stock_show_form', 20);
    function out_of_stock_show_form() {
        global $product;
        if(!$product->is_in_stock( )) {
            echo  '<div class="oos-form">';
            echo  '<b>Bu Ürünün Stok Bilgisi Hakkında Bilgi Almak İstiyor musunuz ?</b>:<br>İletişim :';
            echo  do_shortcode('[whatsappsupport number="[COLOR=#000000][FONT=Open Sans]Telnumarası[/FONT][/COLOR] " text="Whatsapp Destek" text-color="#fff" bg-color="#22c15e" message="Merhaba" ] [maxbutton id="1"]');
            echo  '</div>';
        }
    }
     
    /* This one will work on Variable Product - When a Variation is out of stock */
    add_filter( 'woocommerce_available_variation', 'variation_out_of_stock_show_form', 10, 3 );
    function variation_out_of_stock_show_form( $data, $product, $variation ) {
        if( ! $data['is_in_stock'] )
        {
            $data['availability_html'] = '<div class="oos-form">';
            $data['availability_html'] .= '<b>Bu Ürünün Stok Bilgisi Hakkında Bilgi Almak İstiyor musunuz ?</b>';
            $data['availability_html'] .= do_shortcode('[whatsappsupport number="Telnumarası" text="Whatsapp Destek" text-color="#fff" bg-color="#22c15e" message="Merhaba" ]');
            $data['availability_html'] .= '</div>';
        }
        return $data;
    }
    Whatsapp gozukmesı ıcın eklentısını kurmanız gerekıyor