How to populate city, state... for a location ?

  • Redine
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 6 months ago - 7 years 6 months ago #106208 by Redine
Hi,

It looks like that the eb_locations sql table for all locations the city, state... fields along with the address and lat/long.
However, in my case, city, state... are not populated. I just have the address, the lat and the long.

Anyway to have them populated (from the front end) automatically when the address is retrieved from google maps ?
I checked all options but was not lucky to find it :( .

Thanks,
Redine
Last edit: 7 years 6 months ago by Redine. Reason: Just changed the topic icon to question

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #106215 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to populate city, state... for a location ?
Hi Redine

Right now, we use address as full address, so city and state is not used. I also tried but could not find an easy way to populate city and state from google map API

So if you really need these data, I am afraid of you will have to enter it manually

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Redine
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 6 months ago #106223 by Redine
Hi,

Thanks for the quick reply. Ok I would look into this. If I found out a way to do it, I will share it.

The fields to enter the city, zip... are not displayed when I want to add a location.
Is it configurable somewhere ?

Thanks,
Redine
Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #106242 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to populate city, state... for a location ?
Hi Redine

Currently, the data for that two fields are not being used, so the settings are being hided by default

You can edit the code abit to remove it. The file you need to modify is components/com_eventbooking/view/location/form.php, look at that file and you will be able to do the modification to show it

You should copy the modified file to PATH_TO_TEMPLATE/html/com_eventbooking/location folder on your site so that it won't be lost when you update to future releases of the extension

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #109015 by Jonathan
Actually, if you want to have these fields show on the back end too, you have to override the admin version of that which is administrator/components/com_eventbooking/view/location/tmpl/default.php
and put a copy in the html folder in your admin template (usually isis).

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #109016 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to populate city, state... for a location ?
Yes, that's correct. Thanks Jonathan

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc