Support » Plugin: FC's Retirement Age Calculator » How to set default currency to GBO

  • Resolved Tanmay Kumar Das

    (@tanmay-kumar-das)


    Hi there

    I saw that the plugins allows website owner to select a default currency and date format. (This can now be done by patching the code.)

    Could you let me know the code snippet please?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor financialcalculators

    (@financialcalculators)

    The calculator is designed so that the user can change the currency, not the website’s owner. Once the user selects the currency, it will be remembered the next time they visit the site. This seems to be the best approach for websites that have an international audience.

    However, if you want to make an edit to the source code, you (the website owner) can change the currency. Here’s how to do it:

    In the plugin folder, there is a js folder. Should be here with default install:

    <domain>\wp-content\plugins\fc-retirement-age-calculator\js

    find this file:

    interface.RETIRE-AGE-WIDGET.min.js

    With a plain text editor, such as notepad open it up and search for this text:

    a.CCY_CONVENTIONS=[{sep:”,”,dPnt:”.”,ccy:”$”,ccy_r:””}

    Should be around row 7. Change the “$” to whatever you need as the example below. Save, and refresh the webpage

    a.CCY_CONVENTIONS=[{sep:”,”,dPnt:”.”,ccy:”Ksh”,ccy_r:””}

    This will change the plugin’s default for you

    The downside with this hack is, no one visiting the page will be able to set the currency to “$”. Or at least I don’t think they will be able to. I didn’t actually test that.

    Hope this works for you.

    Thread Starter Tanmay Kumar Das

    (@tanmay-kumar-das)

    Brilliant thank a lot bro!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to set default currency to GBO’ is closed to new replies.