• Resolved Jure

    (@jurero123)


    Hi,

    is there a helper function that I can use to convert product base price? We are using bulk pricing discount and it works fine with the default currency, but not with additional ones.

    When I set $cart_item[‘data’]->set_price($price) I need to use converted value to be correct.

    I have tried using shortcodes, but they all return HTML and not the just float number of the product price.

    Thank you,
    Jure

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelagrey

    (@angelagrey)

    Hi,

    By “product base price” I supposed you mean the product price in the default currency. So the issue is with the other currency?
    Could you let me know further what the problem is when the currency changes to the other? How incorrect is the converted price?
    Also, please send me the link to the page where you use the shortcode, and the shortcode you use.

    Thank you.
    Best regards.

    Thread Starter Jure

    (@jurero123)

    It is quite complicated to explain what is going on in the background (bulk discounts and few additional things).

    I partially solved the issues, but I would need to get the conversion rate between default currency (USD) and the selected one (as a float, not string that comes from the shortcode – example: [woo_multi_currency_rates currencies=”USD, EUR”])

    What is the best way to get it?

    Plugin Author kimvt1991

    (@kimvt1991)

    Hello Jure,
    Please use wmc_get_price( $price, 'EUR') function to convert price from your default currency to EUR.
    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Helper function to convert product base price’ is closed to new replies.