How to turn off the display " – max price" in the variable product

This topic has 7 replies, 3 voices, and was last updated 10 years, 7 months ago ago by Brian Johnson

  • Avatar: conitex
    conitex
    Participant
    April 30, 2015 at 12:41

    actual variable product ” min – max price ”
    turn off display “-max price” in single product and category product

    or you can change the custom.css or functions.php
    that displayed the only “min” in variable product

    6 Answers
    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 30, 2015 at 12:47

    Hello

    1.Please provide us with the link to your site.
    2. Do you want to hide max price value?

    With best regards
    Brian Johnson

    Avatar: conitex
    conitex
    Participant
    April 30, 2015 at 13:29

    yes

    hide ” – max price” in the variable product

    only display “min price

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Participant
    April 30, 2015 at 13:48

    Hello,

    Sorry for inconvenience but this is Woocommerce configuration and you have to contact their support team.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 30, 2015 at 13:58

    You may try to add following code into the custom.css:

    .price {color:transparent!important}
    .price .amount{color:red!important;}
    .price :nth-child(2) {display:none}

    With best regards
    Brian Johnson

    Avatar: conitex
    conitex
    Participant
    April 30, 2015 at 15:06

    work change function.php
    <?php
    define(‘ETHEME_DOMAIN’, ‘legenda’);
    require_once( get_template_directory() . ‘/framework/init.php’ );

    add_filter(‘woocommerce_variable_price_html’, ‘custom_variation_price’, 10, 2);
    function custom_variation_price( $price, $product ) {
    $price = ”;
    if ( !$product->min_variation_price || $product->min_variation_price !== $product->max_variation_price ) $price .= ‘<span class=”from”>’ . _x(‘from’, ‘min_price’, ‘woocommerce’) . ‘ </span>’;
    $price .= woocommerce_price($product->min_variation_price);
    return $price;
    }

    or

    <?php
    define(‘ETHEME_DOMAIN’, ‘legenda’);
    require_once( get_template_directory() . ‘/framework/init.php’ );

    add_filter(‘woocommerce_variable_price_html’, ‘custom_variation_price’, 10, 2);
    function custom_variation_price( $price, $product ) {
    $price = ”;
    if ( !$product->min_variation_price || $product->min_variation_price !== $product->max_variation_price ) $price .= ‘<span class=”from”>’ . _x(‘ ‘, ‘min_price’, ‘woocommerce’) . ‘ </span>’;
    $price .= woocommerce_price($product->min_variation_price);
    return $price;
    }

    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 30, 2015 at 15:09

    We are glad that you have managed to find the solution.

    With best regards
    Brian Johnson

  • Viewing 7 results - 1 through 7 (of 7 total)

The issue related to '‘how to turn off the display " – max price" in the variable product’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.