Incorrect % calculation with Interest under Currencies Tab
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 sprad on December 11, 2019, 09:35Hello,
I updated the currency changer to the latest one and I set the Interest under the Currencies Tab. All the interest are calculated incorrectly.
For example if you set it to 0.025 for all the currencies you are using, for a 2.5% surcharge then the interest calculated will not be correct or even constant across the currencies. On some currencies this 2.5% produced a 0.5% increase, 5.3% increase and 3.7% increase on the ones that I tested and calculated. All currencies there are set 2.5% with the exception of the AUD which is the home currency.
Hello,
I updated the currency changer to the latest one and I set the Interest under the Currencies Tab. All the interest are calculated incorrectly.
For example if you set it to 0.025 for all the currencies you are using, for a 2.5% surcharge then the interest calculated will not be correct or even constant across the currencies. On some currencies this 2.5% produced a 0.5% increase, 5.3% increase and 3.7% increase on the ones that I tested and calculated. All currencies there are set 2.5% with the exception of the AUD which is the home currency.
Quote from Pablo Borysenco on December 11, 2019, 13:34Hello
This extra percentage is not for the price. This is for rate
Hello
This extra percentage is not for the price. This is for rate
Quote from sprad on December 11, 2019, 15:41Hi Pablo,
Since the percentage is calculated for the rate shouldn't the whole price change by the same percentage? The conversion is calculated with the new conversion rate with the extra percentage so the total value should be changing by the same percent regardless that we change for the rate, unless I miss something how this 'interest' works.
Hi Pablo,
Since the percentage is calculated for the rate shouldn't the whole price change by the same percentage? The conversion is calculated with the new conversion rate with the extra percentage so the total value should be changing by the same percent regardless that we change for the rate, unless I miss something how this 'interest' works.
Quote from Pablo Borysenco on December 12, 2019, 12:21Hello
I mean this - https://c2n.me/453Y7lv.png
Try to disable all plugins except w00+woocs and do test
Hello
I mean this - https://c2n.me/453Y7lv.png
Try to disable all plugins except w00+woocs and do test
Quote from sprad on December 12, 2019, 15:28Hi Pablo,
Not sure if I am missing something with this percent increase calculation but what you show standard rates and the 10% interest charge on them, the final rates look more than 10%.
Hi Pablo,
Not sure if I am missing something with this percent increase calculation but what you show standard rates and the 10% interest charge on them, the final rates look more than 10%.
Quote from sprad on December 13, 2019, 03:43I get it now, it is NOT a % calculation, it only adds that fixed value to the rate.
That is not as useful as the % addition would be. It would be helpful if there would be a selection to set the interest as a fixed rate or a %. I think the % would be a lot more useful and beneficial because the currency conversion charges are based on a % of the purchased value and not a fixed charge. Usually that is what we need to recover in the transaction. That way we only charge the customer what we have to pay for the conversion. With a fixed value as the rate changes that % will vary as well.
What do you think?
I need to implement the % interest somehow.
I get it now, it is NOT a % calculation, it only adds that fixed value to the rate.
That is not as useful as the % addition would be. It would be helpful if there would be a selection to set the interest as a fixed rate or a %. I think the % would be a lot more useful and beneficial because the currency conversion charges are based on a % of the purchased value and not a fixed charge. Usually that is what we need to recover in the transaction. That way we only charge the customer what we have to pay for the conversion. With a fixed value as the rate changes that % will vary as well.
What do you think?
I need to implement the % interest somehow.
Quote from Pablo Borysenco on December 13, 2019, 12:17Hello
I get it now, it is NOT a %calculation, it only adds that fixed value to the rate. - Yes! https://c2n.me/453Y7lv.png
Try to read this - https://currency-switcher.com/how-to-manipulate-with-currencies-rates/
Hello
I get it now, it is NOT a %calculation, it only adds that fixed value to the rate. - Yes! https://c2n.me/453Y7lv.png
Try to read this - https://currency-switcher.com/how-to-manipulate-with-currencies-rates/
Quote from sprad on December 15, 2019, 09:19Thanks, that did the job with modification.
Thanks, that did the job with modification.
Quote from Pablo Borysenco on December 16, 2019, 12:26Hello
Great! Welcome;)
Hello
Great! Welcome;)
Quote from sprad on December 17, 2019, 06:55Hi Pablo,
I have encountered a strange problem. If you go to the products page or any individual product then the currency changes once it is changed in the menu, see this page for normal operation http://shaneg3.sg-host.com/products-alt/
When I change currency on this page http://shaneg3.sg-host.com/the-system/electrodes/ the prices should update on the list which only happens once the currency changed and the page is refreshed. Why doesn't it change without page refresh and it does not change the currency in the menu either.
The page is built with Elementor Pro page builder and I put this php in the child theme function.php
//Gets the currently selected currency symboladd_shortcode('my_woocs_sign', 'my_woocs_sign');function my_woocs_sign(){global$WOOCS;$currencies = $WOOCS->get_currencies();return$currencies[$WOOCS->current_currency]['symbol'];}//Gets the currently selected currency codeadd_shortcode('my_woocs_code', 'my_woocs_code');function my_woocs_code(){global$WOOCS;$currencies = $WOOCS->get_currencies();return$currencies[$WOOCS->current_currency]['name'];}function custom_price_shortcode_callback( $atts ) {$atts = shortcode_atts( array('id' => null,), $atts, 'product_price' );if( intval( $atts['id'] ) > 0 && function_exists( 'wc_get_product' ) ){// Get an instance of the WC_Product object$product = wc_get_product( intval( $atts['id'] ) );// Get the product prices$price = wc_get_price_to_display( $product, array( 'price' => $product->get_price() ) ); // Get the active price$regular_price = wc_get_price_to_display( $product, array( 'price' => $product->get_regular_price() ) ); // Get the regular price$sale_price = wc_get_price_to_display( $product, array( 'price' => $product->get_sale_price() ) ); // Get the sale price}//Returning the current currency code with the WOOCS price$symbol = my_woocs_sign();$currency_code = my_woocs_code();return $currency_code. ' '. $symbol. $price;}add_shortcode( 'product_price', 'custom_price_shortcode_callback' );From the Elementor widget I use the Dynamic->Shortcode and use the short code [product_price id="xxxx"], replacing the xxxx with the actual product IDWhy isn't it updating the currency price and the currency in the menu on this page but everywhere else it works correctly?I also use this php to add the interest % as you suggested.// add surcharge to the currency for conversion cost coverageadd_filter('woocs_currency_data_manipulation', 'woocs_currency_data_manipulation', 1, 1);function woocs_currency_data_manipulation($currencies){//for all overseas currencies increase the conversion rateforeach ($currenciesas$key => $value)
{if ($key != 'AUD'){$currencies[$key]['rate'] = $value['rate'] + 0.035*$value['rate'];//add 3.5% conversion charge to all currencies except AUD home currency
break;}}return$currencies;}Kind regards,Andrew
Hi Pablo,
I have encountered a strange problem. If you go to the products page or any individual product then the currency changes once it is changed in the menu, see this page for normal operation http://shaneg3.sg-host.com/products-alt/
When I change currency on this page http://shaneg3.sg-host.com/the-system/electrodes/ the prices should update on the list which only happens once the currency changed and the page is refreshed. Why doesn't it change without page refresh and it does not change the currency in the menu either.
The page is built with Elementor Pro page builder and I put this php in the child theme function.php
foreach ($currenciesas$key => $value)
Quote from Pablo Borysenco on December 17, 2019, 12:40Hello Andrew
This is a caching issue. There is no price on this page that the plugin can recognize.
price must have this container - https://c2n.me/458IP0Z.png
Hello Andrew
This is a caching issue. There is no price on this page that the plugin can recognize.
price must have this container - https://c2n.me/458IP0Z.png
Quote from sprad on December 17, 2019, 14:28Hi Pablo,
I was expecting that at least the currency menu changes. So what you saying is if there is no price on the page that the plugin recognizes then the actual currency change will not happen in the menu either? Do I understand it correctly?
Hi Pablo,
I was expecting that at least the currency menu changes. So what you saying is if there is no price on the page that the plugin recognizes then the actual currency change will not happen in the menu either? Do I understand it correctly?
Quote from Pablo Borysenco on December 18, 2019, 12:32Hello
Yes! This is done to save resources.
Hello
Yes! This is done to save resources.