Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to get the base currency symbol

    General Discussion
    2
    4
    258
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      adebayoade last edited by

      I would like to pass the base currency symbol as a prop to a component. The function below is returning the currency code instead of the symbol.

      core()->currencySymbol(core()->getBaseCurrencyCode());
      

      Thanks.

      1 Reply Last reply Reply Quote 0
      • A
        adebayoade last edited by adebayoade

        I was able to get the currency symbol using the function below;

        {{ core()->getCurrentCurrency()['symbol'] }}
        
        1 Reply Last reply Reply Quote 0
        • sanjay-webkul
          sanjay-webkul last edited by

          @adebayoade said in How to get the base currency symbol:

          {{ core()->getCurrentCurrency()['symbol'] }}

          Hi there,
          This code will work only if the currency symbol added by admin.

          1 Reply Last reply Reply Quote 0
          • sanjay-webkul
            sanjay-webkul last edited by

            Otherwise this will return the symbol from php format currency

            1 Reply Last reply Reply Quote 0
            • First post
              Last post