• 31-10-2021, 12:37:08
    #1
    Merhabalar güzel forumlar olsun herkese.
    WooCoommerce sistemde Flatsome tema kullanıyorum. Ürünlerim varyasyonlu olduğu için fiyat aralığı gözüküyor. Müşterinin de bu durumda kafası karışıyor.
    Örneğin ana sayfada sergilenen ürünün altında “119-299 TL” yerine “119 TL’den başlayan fiyatlarla…” diyerek belirtmek istiyorum. Bunu bir eklenti ya da düzenlemeyle sağlayabilir miyim?
    Fikirlerini sunan arkadaşlara şimdiden teşekkürler.
  • 31-10-2021, 12:57:38
    #2
    En düşük veya en yüksek fiyati gösterme yapıla bir iki kod değişikliği ile googledâ aratirsan bulursun
  • 12-12-2021, 14:11:50
    #3
    // Show only lowest prices in WooCommerce variable products
    
    add_filter( 'woocommerce_variable_sale_price_html', 'wpglorify_variation_price_format', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'wpglorify_variation_price_format', 10, 2 );
    
    function wpglorify_variation_price_format( $price, $product ) {
    
    // Main Price
    $prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
    $price = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
    
    // Sale Price
    $prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) );
    sort( $prices );
    $saleprice = $prices[0] !== $prices[1] ? sprintf( __( '%1$s\'dan başlayan fiyatlarla', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
    
    if ( $price !== $saleprice ) {
    $price = '<del>' . $saleprice . $product->get_price_suffix() . '</del> <ins>' . $price . $product->get_price_suffix() . '</ins>';
    }
    return $price;
    }