Third Time Lucky – Default Country

Home Forums Calendar Products Community Events Third Time Lucky – Default Country

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #969800
    Keith
    Participant

    Now I’ve uploaded the newer plugin version, I have one remaining problem, albeit a fairly major one.

    The default country is set as the USA which is pointless for us as our website targets a UK audience.

    There is clearly no way to set a default country in the admin so I’m guessing I need to change something in the code somewhere?

    Please take this in the spirit it’s intended but I would have thought that allowing somebody submitting their event to choose the country they’re in by default, is a fairly fundamental requirement for any form plug-in.

    #969899
    Brook
    Participant

    Howdy Keith!

    I would love to help you with that. One of the features of Events Calendar Pro is that it makes it very easy to change the defaults there, you can even easily specify a custom list of countries if you only offer events in a handful or less.

    That said, if none of the other features of PRO interest and you are a programmer, you could pretty easily write your own defaults. There is a setting in your WordPress database WP_Options table with a key “tribe_events_calendar_options”. You can unserialize, add these settings, and reserialize it.

    [eventsDefaultOrganizerID] => 0
    [eventsDefaultVenueID] => 0
    [eventsDefaultAddress] =>
    [eventsDefaultCity] =>
    [eventsDefaultState] =>
    [eventsDefaultProvince] =>
    [eventsDefaultZip] =>
    [defaultCountry] => Array
    (
    [0] => GB
    [1] => United Kingdom
    )
    
    [eventsDefaultPhone] =>
    [tribeEventsCountries] =>

    Does that all make sense? Will that work for you? Please let us know.

    Cheers!

    – Brook

    #969962
    Keith
    Participant

    This reply is private.

    #970166
    Brook
    Participant

    This reply is private.

    #970851
    Keith
    Participant

    Hi Brook

    I think you misunderstand me.

    I don’t want, or expect this function to be added to the core plug-in; which is why is posted the issue in the Community Event forum and made reference to the fact that an $89 plug-in didn’t have a fundamental function. I certainly wouldn’t be complaining if this was about the core plug-in because I appreciate it’s free.

    And you say I’m the first person to mention it however, there are numerous threads in the forum from Users with exactly the same issue.

    To be 100% clear, I simply want to be able set the default country in the community events form that Users submit. I don’t wish to become a pain but I’m suggesting that if you are selling a plug-in to a global market, then it should work just as well for somebody in the UK as it does for somebody in the USA (or anywhere else for that matter). At the moment it simply doesn’t because I can’t allow the users on our website to have their own country set by default, and that’s the problem I have.

    #970940
    Rob
    Member

    Hi Keith. I head up the support team at Modern Tribe and sent you an email about this last night; can we continue the exchange there, please? It sounds like we may have falsely set your expectations about what the plugin can do vs cannot do out of the box.

    Let me know if that email didn’t come through and I can resend it. However, I’m not sure we’re going to be able to provide much more of an immediate resolution for your problem here beyond the one Brook shared already.

    Looking forward to hearing from you so we can get this sorted 🙂 Thanks for your patience so far!

    #970951
    Keith
    Participant

    This reply is private.

    #971125
    Rob
    Member

    Hi Keith! Thanks for the follow-up; weird that the email didn’t come through, as that was the same email address I sent to. Looks like my message went out at 6 pm on the dot (Pacific time) last night.

    Might the message have gotten caught in a spam filter? If not, do you have an alternate email I can send to? Feel free to reach out to me directly – rob (@) tri.be – and I can reply with the message directly, if that’d be easier.

    Thanks for your patience so far.

    #971158
    Brook
    Participant

    Howdy again,

    Keith I have some good news. We wanted to make this even easier for you change the default away from the United States without purchasing Pro. So Rob asked me to write a simple plugin for you, that wasy it’s simpler than opening up the database and dealing with serialization.

    Download the plugin here: tribe_set_default_country Add it to your website by going to WP Admin > Plugins > Add Plugin, then clicking upload plugin. Select this file that you just downloaded. Once it’s installed just hit activate, and it will change over to the UK as a default. If anyone else comes across this topic and wants a different country as the default, them you can modify the line in the plugin that specifies ‘GB’, ‘United Kingdom’ to a different country in the list.

    We also discovered something while looking into this. It used to be in past versions that our plugin did not specify a default country, rather the default was “Please select a country”. At some point a bug was introduced in Community Events that caused this to default to the United States instead. So that helps explain why we have not seen much feedback on this yet. It’s actually a newer bug. I am truly sorry for the inconvenience. Hopefully that snippet above will help set you on the right path. We will fix that in Community as soon as we can.

    Let me know if you need anything else. Cheers!

    – Brook

    #971223
    Keith
    Participant

    That worked perfectly – thanks a lot for sorting that out.

    A quick related question if I may…

    THe form field labels still refer to ‘State or Province’ rather than the UK equivalent of ‘County’. Can you tell me which file I need to edit to change the field labels in the community form please?

    #971303
    Brook
    Participant

    You are super welcome. I am happy that worked.

    THe form field labels still refer to ‘State or Province’ rather than the UK equivalent of ‘County’. Can you tell me which file I need to edit to change the field labels in the community form please?

    There are a few ways to address that.

    1. You could create a proper British English (en_GB) translation of the plugins. If we’re able to use your translation we will give you a free renewal or license to a plugin of your choice.
    2. Create a theme override which allows you to modify that line, but not lose the change when you update your plugin. This guide will help, but it’s necessarily intended for developers or people who write themes. The file you wish to override is ‘public_html/wp-content/plugins/the-events-calendar-community-events/src/views/community/modules/venue.php’ and the line number is 140 in that file.
    3. Use a snippet like this, copy/paste it into your theme’s functions.php. Then follow this tutorials instructions to find and modify that string.

    Hopefully one of those options works. Let me know if you need further assistance. If not, mind marking this resolved? Cheers!

    – Brook

    #971416
    Keith
    Participant

    Option 3 worked perfectly – many thanks for all your help with this.

    #971812
    Brook
    Participant

    You are welcome Keith! Good luck with your project.

    – Brook

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Third Time Lucky – Default Country’ is closed to new replies.