Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Property Hive

    (@propertyhive)

    I’m afraid at the moment it is a hardcoded list, along with things like ISO code and currency related information.

    At this time it would be a case of us manually adding any desired countries if there are any you need right away. I could get them added and get a release out pretty sharpish.

    I will also look at adding a hook in the next couple of days so you can add your own countries via your themes functions.php file too. When this is available I will update this thread and send you a link to documentation on how to do this.

    I hope that answers your query. Do let me know if any further questions regarding this however.

    Thanks

    Thread Starter gordonyg

    (@gordonyg)

    Sure. Can you also do a function that we can change the currency symbol too ?

    Plugin Author Property Hive

    (@propertyhive)

    We’ve just released version 1.0.8 which now enables you to add custom countries and modify existing ones. In your themes functions.php you can add something like so:

    add_filter( 'propertyhive_countries', 'add_country');
    function add_country($countries)
    {
        $countries['EG'] = array(
            'name' => 'Egypt',
            'currency_code' => 'EGY',
            'currency_symbol' => '$',
            'currency_prefix' => true
        );
        return $countries;
    }

    Hope that helps

    Thread Starter gordonyg

    (@gordonyg)

    Dear Developer,
    i have tried your above codes. I manage to change the country but the property list still displayed the other symbol and not my amended symbol £12,000 pcm…..

    i have amended my symbol to be RM but it still displayed £…..

    pls help. Thanks.

    Plugin Author Property Hive

    (@propertyhive)

    Am I right in assuming you’re trying to change the currency for United Kingdom?

    I’ve just tried it here using the following code and it worked:

    add_filter( 'propertyhive_countries', 'add_country');
    function add_country($countries)
    {
        $countries['GB'] = array(
            'name' => 'United Kingdom',
            'currency_code' => 'GBP',
            'currency_symbol' => 'RM',
            'currency_prefix' => true
        );
        return $countries;
    }

    Note that the country code for United Kingdom is GB and not UK (just incase that’s a common mistake).

    If this doesn’t work I have a few questions:

    1. In settings, which countries do you have selected?
    2. Where are you seeing the £ symbol? In the backend or on the website? Or both?
    3. Did you upgrade to version 1.0.8?
    4. Can you send me the code you’re using to try and overwrite the currency?

    Let me know and I’ll do my best to get this sorted for you.

    Thanks,
    Steve

    Thread Starter gordonyg

    (@gordonyg)

    dear developer,
    See my reply below :

    1.i choose MALAYSIA
    2. Malaysia currency code is RM. i saw it in property listings.
    3.Yes.
    4.see below :

    add_filter( ‘propertyhive_countries’, ‘add_country’);
    function add_country($countries)
    {
    $countries[‘EG’] = array(
    ‘name’ => ‘Malaysia’,
    ‘currency_code’ => ‘MYR’,
    ‘currency_symbol’ => ‘RM’,
    ‘currency_prefix’ => true
    );
    return $countries;
    }

    Plugin Author Property Hive

    (@propertyhive)

    Ok, I think I know what might’ve happened. Here’s what you should do:

    Your code to add the country/currency should look like this:

    add_filter( 'propertyhive_countries', 'add_country');
    function add_country($countries)
    {
        $countries['MY'] = array(
            'name' => 'Malaysia',
            'currency_code' => 'MYR',
            'currency_symbol' => 'RM',
            'currency_prefix' => true // whether RM should come before or after the price
        );
        return $countries;
    }

    Note the ‘MY’ instead of ‘EG’ as you had in your code.

    Make sure in ‘Settings’ that your countries are selected correctly after amending the code above.

    Then I believe it will be a case of going through and just clicking ‘Save’ on each property. Maybe try it with one property first.

    Let me know how you get on.

    Thread Starter gordonyg

    (@gordonyg)

    dear developer,
    i have done the changes. it works for new listings. but doesn’t affect old listing even i save again.

    cheers,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can add More Countries in Countries Where You Operate ?’ is closed to new replies.