Support » Plugin: WooCommerce Multilingual - run WooCommerce with WPML » Crypto currency exchange rate

  • Resolved hashexpert

    (@hashexpert)


    When setting up Multicurrency mode I chose 6 digits for BTC http://joxi.ru/ZrJGnalf9ZlqVm however, the rate is still taken with 4 digits which basically invalidates the idea of rate since the actual is 0.00015 which is 50% greater.

    E.g. the product cost $5500 which is 0.825 BTC at normal rate, and on the product page I get 0.55 BCT because of the rate taken with 4 digits.

    How can I adjust the number of digits which is using with specific exchange rate?

Viewing 15 replies - 1 through 15 (of 16 total)
  • hashexpert

    (@hashexpert)

    speaking up about USD/BTC rate , at least 6 digits should be available to have the actual rate

    hashexpert

    (@hashexpert)

    http://joxi.ru/Vm6lwOPTDq8BMA the currencyLayer sends the rate with 6 digits from what I found in the API answer, so most likely the issuer is on the plugin side

    thanks

    Plugin Support George Botsev

    (@botzev)

    hashexpert

    (@hashexpert)

    Thanks for your answer but I already told that I did

    Please see on the picture below http://joxi.ru/a2XE0qRI1LoR1A

    Fig 1 – I set number of decimals to 6 in the Settings
    Fug 2 – The BTC price on product page shows with 6 decimals

    BUT

    Fig 3 – The rate you guys receiving from CurrencyLayer still shows 4 decimals even though I see in API that CurrencyLayer outputs 6 decimals http://joxi.ru/52aEKa7I4xaVD2

    Thanks

    hashexpert

    (@hashexpert)

    To me it seems that somewhere in your code you have limited the number of digits of the exchange rate to 4 strict

    Plugin Support George Botsev

    (@botzev)

    I think that you are right.
    I think that I found the place in our code where we limit this.
    Please check \woocommerce-multilingual\classes\multi-currency\exchange-rate-services\class-wcml-exchange-rates-fixerio.php row 57

    
    $rates[ $to ] = round( $rate, 4 );
    

    Change the number 4 to a higher number (6)

    hashexpert

    (@hashexpert)

    thanks for the code but seems that was not the case. I changed this to “6” both in fixerio and currencylayer slugs, though after auto update the btc rate is still 4 digits http://joxi.ru/xAebBVaiplGJGr seems you cut it somewhere else

    Plugin Support George Botsev

    (@botzev)

    I see…
    Have you checked if the value was really updated?
    I suggest that you turn-off the rate, save the settings page and re-enable it again and force a manual update first.

    I have escalated the issue to our developers.
    Once they check it and suggest a fix, I will let you know.

    hashexpert

    (@hashexpert)

    I see…
    Have you checked if the value was really updated?
    I suggest that you turn-off the rate, save the settings page and re-enable it again and force a manual update first.

    this was the first I did after, nonethless, the rate is still with 4 digits on the setting page http://joxi.ru/xAebBVaiplGJGr

    hashexpert

    (@hashexpert)

    I even changed 4 to 6 in that part you add a lifting charge (since I set it to 1% in settings) but this also did not work for me

    hashexpert

    (@hashexpert)

    this was the first I did after, nonethless, the rate is still with 4 digits on the setting page http://joxi.ru/xAebBVaiplGJGr

    when in manual mode, I can enter any rate – with 5 or 6 or more digits, but as soon as I switch to auto – it cut it to 4

    thanks

    Plugin Support George Botsev

    (@botzev)

    I just tested in a clean install, after doing the adjustment from 4 to 6 where was set.
    Here are my results: https://imgur.com/a/gMBAgUK
    As you can see, there is 6 digits after the decimal.

    Plugin Support George Botsev

    (@botzev)

    I also edited the file: \woocommerce-multilingual\classes\multi-currency\class-wcml-exchange-rates.php at line: 163 for the lifting charge.

    
    			$rates[ $k ] = round( $rate * ( 1 + $this->settings['lifting_charge'] / 100 ), 4 );
    
    hashexpert

    (@hashexpert)

    I also edited the file: \woocommerce-multilingual\classes\multi-currency\class-wcml-exchange-rates.php at line: 163 for the lifting charge.

    shouldn’t it be 6 not 4 as well?

    just tested in a clean install, after doing the adjustment from 4 to 6 where was set.
    Here are my results: https://imgur.com/a/gMBAgUK
    As you can see, there is 6 digits after the decimal.

    i don’t use a cache plugins (least think so) but are there any way to escalate a cash clearance ? seems like it’s a cash issue

    thanks

    Plugin Support George Botsev

    (@botzev)

    Yes, it should be 6 – I just provided the exact line of code so that you can find it.

    Perhaps if you trigger the cron job for updating the currency rates, then the cache would be cleared. I am not sure though.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Crypto currency exchange rate’ is closed to new replies.