Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Dante
  • #183561
    numashop
    Member
    Post count: 16

    Please can you tell me a custom css for remove the range price from variable products.

    Now its appear like: 10-15€ inc.IVA
    and I want only the lower price: Desde 10€ inc.IVA

    #183587
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Try adding this to the child theme’s functions.php file:

    // Use WC 2.0 variable price format
    add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
    function wc_wc20_variation_price_format( $price, $product ) {
    $min_price = $product->get_variation_price( 'min', true );
    $max_price = $product->get_variation_price( 'max', true );
    if ($min_price != $max_price){
    $price = sprintf( __( 'From %1$s', 'woocommerce' ), wc_price( $min_price ) );
    return $price;
    } else {
    $price = sprintf( __( '%1$s', 'woocommerce' ), wc_price( $min_price ) );
    return $price;
    }
    }

    – Kyle

    #183588
    numashop
    Member
    Post count: 16

    Dear Kyle,

    I don´t have child theme, i posible to use a custom css?

    #183589
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    I’m afraid not sorry

    – Kyle

    #254246
    blueseanj
    Member
    Post count: 33

    Hi Kyle,
    i’m still having the same issue with this price range thing, i used the code you posted but it does not work for me, is there any way i can fix this?

    Thanks

    #254265
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,

    @blueseanj
    – Where did you paste this code? Please provide me specific page url to check.
    Thanks
    Mohammad

    #254285
    blueseanj
    Member
    Post count: 33
    This reply has been marked as private.
    #254306
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please use this css code also:-

    .woocommerce div.product .summary p.price, .woocommerce-page div.product .summary p.price {
        width: 68px !important;
        overflow: hidden !important;
    }

    Thanks
    Mohammad

    #254342
    blueseanj
    Member
    Post count: 33

    Thank you Mohammad that works like a charm, I know this isn’t the right thread, but if you can see on the product page, the product options are too small. is there a way to increase their size without effecting the buttons? just so they can be more visible for everybody..

    Thanks for your support Mohammad

    #254351
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Please reply to him in your other thread

    Thanks Mohammad

    – Kyle

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register