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

Problem with currencies – Extra Product Options (Product Addons) for WooCommerce

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.
12

I am using the Extra Product Options (Product Addons) for WooCommerce PRO plugin and in the case of different currencies the price is the same, e.g. 15 $ and 15 €, is there any compatibility solution for this? (on the bottom of page extra options)

The page I need help with: http://promx4riders.com/produkt/brush-design-3

Hello

Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png

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

Ok, I added

Dud  you  read this? - https://currency-switcher.com/woocs-labs  Found a third party plugin in the list?

https://codecanyon.net/item/woocommerce-extra-product-options/7908619

And add in file -“wp-content\plugins\woocommerce-tm-extra-product-options\assets\js\tm-epo.js” – I added code – https://share.pluginus.net/image/i20220218190810.png

if (typeof woocs_current_currency != 'undifined'){
data.symbol = woocs_current_currency['symbol'];
data.precision = woocs_current_currency['decimals'];
}

And  check  option – https://c2n.me/4eZhu50.png

But it is diferent plugin:  https://pl.wordpress.org/plugins/woo-extra-product-options/#description :(

Please take a look at the price and the price table before adding extras and after. With euros and zlotys. Can anything be done about it?

http://promx4riders.com/produkt/brush-design-4/?currency=PLN

Hello

. Can anything be done about it? - Yes! Please try to read  this - https://currency-switcher.com/woocs-labs

Drop  me  wp-admin+FTP access to your  test  site - https://share.pluginus.net/image/i20210618130558.png ->https://share.pluginus.net/image/i20210618130637.png

I will add the plugin to the adaptation queue

Ok, I add wp-admin+FTP access

I added this to the adaptation queue

Thank you, How long can it take?

Hello

This is very difficult to plan because each plugin on adaptation has a unique code that we still need to study.

I think it will take two to three weeks

Hello

In  functions.php  add  code:

add_filter('thwepo_extra_cost_option_price', function($price, $price_type, $option, $name){
if (class_exists('WOOCS') AND $price > 0) {
global $WOOCS;
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
return $price;
},99,4);

In file  public_html\wp-content\plugins\woocommerce-extra-product-options-pro\includes\utils\class-thwepo-utils-field.php - add  code - https://share.pluginus.net/image/i20220422172519.png

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

In  file - \wp-content\plugins\woocommerce-extra-product-options-pro\includes\class-thwepo-price.php - add  code - https://share.pluginus.net/image/i20220422172737.png

if (class_exists('WOOCS') AND isset($result['extra_price'])) {
global $WOOCS;
$result['extra_price'] = $WOOCS->woocs_exchange_value(floatval($result['extra_price']));
}

And  add  code - https://share.pluginus.net/image/i20220422172846.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'];
$new_price = $new_price / $rate;
}
}
}

and  add  code - https://share.pluginus.net/image/i20220422172947.png

if (class_exists('WOOCS') AND $product_price> 0) {
global $WOOCS;
$product_price = $WOOCS->woocs_exchange_value(floatval($product_price));
}

and  add code - https://share.pluginus.net/image/i20220422173042.png

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

And  do a test

Thank you very much for your help!

Everything is fine except one field, can you check why the"Your Logo" field doesn't change its price like the others? https://promx4riders.com/produkt/ktm-blade/?currency=GBP

Hello

I  will check  it

Hello

In  functions.php   I  added  code

add_filter('thwepo_extra_cost_unit_price', function($price, $name, $product_price, $price_type){
if (class_exists('WOOCS') AND $price > 0) {
global $WOOCS;
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
return $price;
},99,4);

Please  do a  test

Something very strange is happening with currency conversions. From euros to pounds it is ok, but from euros to zlotys or Swedish kroner, they are very large, strange amounts

img

https://promx4riders.com/produkt/gas-gas-one-line/

 

If is"zł" or"kr" it looks like amounts is  multiplied by 2 times by Rate

Hello

Ok! I will check  it

Maybe this is some clue that if the rate (the currency to which we convert) is lower than 1 (euro), this problem occurs

Hello

I doubt it. I think some  hook is called twice

12