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

Currency Switcher Cannot Update Custom Fields Price Correctly

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.

Hi there,

I have purchased"WOOCS - WooCommerce Currency Switcher" and integrated it with an eCommerce website with"WooCommerce Product Add-Ons Ultimate" plugin together. This plugin is used for defining some calculation formula to calculate the product price according to the predefined rules/selection.

The problem is when the product has been added to the cart which price is calculated by using above mentioned plugin and I switched the currency, the product price cannot be updated correctly or updated twice in the cart.

May I know is this plugin not compatible with"WooCommerce Product Add-Ons Ultimate" plugin?

Please let me know if I need to deploy the website to the server for your investigation, as I am developing the website in my localhost at this moment.

Cheers

Tim

 

Hello  Tim

Read this  please -  https://currency-switcher.com/woocs-labs/

Paste your license key here - https://c2n.me/43SC6rb.png -> https://c2n.me/42HBIt7.png and  wp-admin+FTP access - https://c2n.me/42BAoj4.png -  I will add this plugin to the adaptation queue

Hi Pablo,

I have attached required credential information in the private area already as well as some steps to reproduce the issue for your reference. Please have a look and advise. Thanks a lot

Hello

Thanks for the detailed description!

I added this plugin to the adaptation queue

 

Hello

Please  do  test!

In  file  - plugins\product-extras-for-woocommerce\inc\functions-cart.php - add code - https://c2n.me/45i4VCu.png

if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
}

AND   - https://c2n.me/45i522m.png

if (class_exists('WOOCS') AND $price ) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$price= $final_price / $price;
}
}
}

AND - https://c2n.me/45i5832.png

if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed AND isset($cart_item_data['product_extras']['price_with_extras'])) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$cart_item_data['product_extras']['price_with_extras'] = $cart_item_data['product_extras']['price_with_extras'] / $rate;
}
}
}

 

AND  - https://c2n.me/45i5dEt.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'];
$cart_item_data['product_extras']['price_with_extras_discounted'] = $cart_item_data['product_extras']['price_with_extras_discounted'] / $rate;
}
}
}

 

AND  - https://c2n.me/45i5iDs.png

if(class_exists('WOOCS') AND $item['price']){
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currrent = $WOOCS->current_currency;
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$item['price']= $rate * $item['price'];
}
}
$item['value']=preg_replace('/\((.+)\)/',"", $item['value']);
$item['value'].=sanitize_text_field("(".wc_price($item['price']).")");
}