PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

[ FOX LABS ] WPC Composite Products for WooCommerce (total does not change)

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 please
If 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.

I have a composite product that we sell at a wholesale price. When selecting the products to add them, the total appears in Mexican pesos. The exchange rate is taken by geolocation, in other normal products if it works.

https://tilcoballoons.com/producto/tarima/

 

 

When adding the product to the cart, the subtotal does not change, the price of the product and the total are correct.

 

At the end of the purchase, the price of the product does not change, only the total.

 

 

I hope you can help me, thank you very much.

 

Hello

Please  add  wp-admin + FTP access to your test site - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134615.png

And  I  will  add it  to the adaptation queue

Done, add the requested data. Thank you so much.

Hello

OK!

I will write to you as soon as I get the result

Hello

Please  do a test

I  added  in  functions.php:

add_filter( 'wooco_product_price', function($price_display, $product, $qty, $price){
if (class_exists('WOOCS') AND $price_display > 0) {
global $WOOCS;
$price_display = $WOOCS->woocs_exchange_value(floatval($price_display));
}
return $price_display;
}, 10, 4);
add_filter( 'wooco_product_regular_price', function( $org_price, $product, $qty, $price ){
if (class_exists('WOOCS') AND $org_price > 0) {
global $WOOCS;
$org_price = $WOOCS->woocs_exchange_value(floatval($org_price));
}
return $org_price;
},10,4);
add_filter( 'wooco_product_new_price', function( $new_price, $product, $qty, $price ){
if (class_exists('WOOCS') AND $new_price > 0) {
global $WOOCS;
$new_price = $WOOCS->woocs_exchange_value(floatval($new_price));
}
return $new_price;
},10,4);
add_filter( 'wooco_product_price_html', function( $price_html , $product, $qty, $price ){
if (class_exists('WOOCS') AND $price > 0) {
global $WOOCS;
$price_html = wc_price($WOOCS->woocs_exchange_value(floatval($price)));
//$price_html    = wc_format_sale_price( wc_get_price_to_display( $product, [ 'price' => $price_ori ] ), $price_display );
}
return $price_html;
},10,4);
In  file - \wp-content\plugins\wpc-composite-products\includes\class-wooco.php - I added  code - https://c2n.me/4iU8uGz.png
if (class_exists('WOOCS') AND  $cart_item['wooco_price'] > 0) {
global $WOOCS;
$cart_item['wooco_price'] = $WOOCS->woocs_exchange_value(floatval( $cart_item['wooco_price']));
}

It's perfect, it turned out very well, thank you very much. Everything was corrected, thank you very much. Blessings.

:)

 

Hello

Welcome;)