• Resolved handmadehome

    (@handmadehome)


    Hi,

    I have DHL Express Commerce plugin to get rates by api.
    My shop currency is USD, but DHL api provides rates in RUB. The problem that my website displays shipping prices in RUB. Price just has a $ symbol, but numbers are actually in RUB. As you can see on the screenshot the price 2400.34. That should be about 40USD

    2022-05-23-18-18-49

    I found the thread on your website: https://pluginus.net/support/topic/not-converting-dhl-express-commerce-live-shipping-rates/

    So, I installed your plugin and added the code to wp-content\plugins\woocommerce-dhlexpress-services\woocommerce-dhlexpress-services.php as you recommended (I just changed currency to ‘RUB’)

    if (class_exists('WOOCS')) {
    global $WOOCS;
    if ($WOOCS->is_multiple_allowed) {
    $current = $WOOCS->current_currency;
    $currencies = $WOOCS->get_currencies();
    $def_currency = $WOOCS->default_currency;
    if (isset($currencies['RUB']) AND $def_currency!=='RUB') {
    
    $rate = $currencies['RUB']['rate'];
    $rate -> {'total_price'} = $rate -> {'total_price'}/ $rate;
    }
    }
    }

    But nothing changes. Can you help, please!

    Thank you!

    • This topic was modified 6 months, 2 weeks ago by handmadehome.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter handmadehome

    (@handmadehome)

    UPD:
    I added RUB as a second currency and now I have the same result as described on your website.

    “There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.”

    2022-05-27-12-21-31

    I tried to deactivate WooCommerce Currency Switcher plugin and purge cache, in this case I see shipping rates in RUB again:

    2022-05-27-12-53-41

    • This reply was modified 6 months, 2 weeks ago by handmadehome.
    Plugin Support mediawebster

    (@mediawebster)

    Hello

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

    You can create a new customization request

    Thread Starter handmadehome

    (@handmadehome)

    I have read this. You suggest a code for DHL Express Commerce:
    2022-05-27-15-18-40

    This code contain ‘USD’ argumets. I don’t know which is correct for my situation, so I tried both ‘USD’ and ‘RUB’:))) But when I use code with ‘USD’ nothing changes, situation looks exactly like WooCommerce Currency Switcher plugin is disabled.

    Probably I just doing something wrong… I see that you highlighted currencies in the picture, But I can’t understand what currency code I should place if RUB and USD, both not working:))

    2022-05-27-15-30-01

    Does that mean that code is not working anymore and I need to create a new request?

    • This reply was modified 6 months, 2 weeks ago by handmadehome.
    Plugin Support mediawebster

    (@mediawebster)

    Hello

    Perhaps this code is no longer relevant. You should create the adaptation request

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘DHL Express Rates’ is closed to new replies.