Problem with price
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from rodrigo17r on October 7, 2021, 07:59Hello, I have a product with price ranges. I want the highest price to be seen and the lowest price to be hidden. In the currency of PEN (S /.), If the code that I have put works. But in dollars, it doesn't work. Could you help me please?
Link: https://palhstore.com/producto/adidas-forum-bad-bunny-cafe-unisex/. The highest price is $230.70, but it appears $69.21. (https://prnt.sc/1v4bcln)
This is the code:
function dcms_variation_price_format( $price, $product ) {
$min_price = $product->get_variation_regular_price( 'min' );
$max_price = $product->get_variation_regular_price( 'max' );
$min_sale_price = $product->get_variation_sale_price( 'min' );
$max_sale_price = $product->get_variation_sale_price( 'max' );$result_price = wc_price( $max_price );
if ( $min_price !== $max_price || $min_sale_price !== $max_sale_price ){
if ( $min_sale_price < $min_price ){
$result_price = sprintf( __( '<del>%1$s</del><ins>%2$s</ins>', 'woocommerce' ), $result_price, wc_price( $min_sale_price ) );
} else {
$result_price = sprintf( __( '%1$s', 'woocommerce' ), $result_price );
}
}return $result_price;
}add_filter( 'woocommerce_variable_price_html', 'dcms_variation_price_format', 10, 2 );
Thanks!
Hello, I have a product with price ranges. I want the highest price to be seen and the lowest price to be hidden. In the currency of PEN (S /.), If the code that I have put works. But in dollars, it doesn't work. Could you help me please?
Link: https://palhstore.com/producto/adidas-forum-bad-bunny-cafe-unisex/. The highest price is $230.70, but it appears $69.21. (https://prnt.sc/1v4bcln)
This is the code:
function dcms_variation_price_format( $price, $product ) {
$min_price = $product->get_variation_regular_price( 'min' );
$max_price = $product->get_variation_regular_price( 'max' );
$min_sale_price = $product->get_variation_sale_price( 'min' );
$max_sale_price = $product->get_variation_sale_price( 'max' );
$result_price = wc_price( $max_price );
if ( $min_price !== $max_price || $min_sale_price !== $max_sale_price ){
if ( $min_sale_price < $min_price ){
$result_price = sprintf( __( '<del>%1$s</del><ins>%2$s</ins>', 'woocommerce' ), $result_price, wc_price( $min_sale_price ) );
} else {
$result_price = sprintf( __( '%1$s', 'woocommerce' ), $result_price );
}
}
return $result_price;
}
add_filter( 'woocommerce_variable_price_html', 'dcms_variation_price_format', 10, 2 );
Thanks!
Quote from Pablo Borysenco on October 7, 2021, 10:48Hello
My plugin is currency conversion. We have nothing to do with costamisation of the price format
You can try to add this code here - https://share.pluginus.net/image/i20211007114826.png
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$min_price = $min_price / $rate;$max_price = $max_price / $rate;
$min_sale_price = $min_sale_price / $rate;
$max_sale_price = $max_sale_price / $rate;
}
}
}
Hello
My plugin is currency conversion. We have nothing to do with costamisation of the price format
You can try to add this code here - https://share.pluginus.net/image/i20211007114826.png
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$min_price = $min_price / $rate;
$max_price = $max_price / $rate;
$min_sale_price = $min_sale_price / $rate;
$max_sale_price = $max_sale_price / $rate;
}
}
}
Quote from rodrigo17r on October 10, 2021, 17:09Hi, it works. Thanks!
Another query, when I enter the web by cell phone, on the home page, the product appears in a currency but when I enter the product page it changes currency automatically.
Screenshot 1: https://prnt.sc/1vl3h39
Screenshot 2: https://prnt.sc/1vl3kk5
Help me please!
Hi, it works. Thanks!
Another query, when I enter the web by cell phone, on the home page, the product appears in a currency but when I enter the product page it changes currency automatically.
Screenshot 1: https://prnt.sc/1vl3h39
Screenshot 2: https://prnt.sc/1vl3kk5
Help me please!
Quote from Pablo Borysenco on October 11, 2021, 11:13Hello
Please check options - https://c2n.me/4dCihBW.png AND https://c2n.me/4dCik79.png and do a test
Hello
Please check options - https://c2n.me/4dCihBW.png AND https://c2n.me/4dCik79.png and do a test