• Resolved Musilda

    (@musilda)


    Hello,

    i have problem with plugin on metal-trade.cz page.
    In code i have WC()->cart->get_cart_subtotal() and plugin works correctly, but not for first redirect.
    When you change currency, subotal is not correct.

    Any ideas?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @musilda.

    Looks like you’re using a third-party plugin for pricing.
    Please read this https://currency-switcher.com/woocs-labs/

    Thread Starter Musilda

    (@musilda)

    I am not using plugin for pricing. Its my own code. As i wrote, i am using WooCommerce method WC()->cart->get_cart_subtotal() for display price.

    Hello

    Perhaps this is a double conversion.

    Try reverse conversion:

    if (class_exists(‘WOOCS’)) {
    global $WOOCS;
    $currrent = $WOOCS->current_currency;
    if ($currrent != $WOOCS->default_currency) {
    $currencies = $WOOCS->get_currencies();
    $rate = $currencies[$currrent][‘rate’];
    $sub_tolal = $sub_tolal / $rate;
    }
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with cart_subtotal in theme’ is closed to new replies.