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
This topic has 7 replies, 3 voices, and was last updated 10 years, 7 months ago ago by Brian Johnson
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
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
yes
hide ” – max price” in the variable product
only display “min price
Hello,
Sorry for inconvenience but this is Woocommerce configuration and you have to contact their support team.
Thank you.
Regards,
Eva Kemp.
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
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;
}
We are glad that you have managed to find the solution.
With best regards
Brian Johnson
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