Is it possible with the module to add a phone number field on the /store_locator results? I added one to the content type like normal but I'd like to be able to show it to visitors on the store_locator node as well. I just don't know if this is a Google thing and this module couldn't add anything to Google if it returns whatever it wants.

Comments

recrit’s picture

Status: Active » Needs review

You would have to edit the view - "admin/structure/views/view/google_store_locator_json_export/edit/page"
Some map items that can be changed:

  • Map sidebar: Title - GeoJSON Feed Settings, currently set to the node title
  • Map sidebar: Description - GeoJSON Feed Settings, currently set to the address field but you could create a combined views field that had both in a rewrite.
  • Map location callout: any remaining views field that is not set to GeoJSON Feed Settings title or description

We can add this to the documentation in the README.

RKS’s picture

Ah. I didn't realize there was a view. My thinking was that is was taking the display directly from Google.

But I've added the field under the content type, added the field in the display under the view you mentioned, yet the results under store_locator still won't render the field. Maybe there is an extra step I'm missing or I'm not doing it right?

spacebox’s picture

@RKS

  • Add all fields you'd like to render.
  • Add an extra field of Global: Custom text
  • Edit custom field output to something like "[gsl_addressfield] [field_other_field] [field_yet_another_field]"
  • In Format: GeoJSON settings select your Custom text field for description
himanshupathak3’s picture

I want to add more fields to store locator address after postal code like mobile number etc. Can anyone tell me how to?

Thanks in advance

himanshupathak3’s picture

I want to add more fields to store locator address after postal code like mobile number etc. Can anyone tell me how to?

Thanks in advance

himanshupathak3’s picture

I got. Add a new field in content type (store locator) and add your phone number.

RKS’s picture

Have you looked in the actual /store-locator? Adding content types are easy but they won't appear on the data on the map.

himanshupathak3’s picture

you do not need to add a new content type
just add a field (to the content type store locator) named mobile number of type text and then by display options set the positions.

himanshupathak3’s picture

you do not need to add a new content type
just add a field (to the content type store locator) named mobile number of type text and then by display options set the positions.

RKS’s picture

That's what I meant, add the fields to the content type. But when I tried this it never showed on /store-locator. But adding it to the view is what eventually did the trick for me.

tinem’s picture

I don't understand this. Where more do I need to change it when I have made a field in content type and in view and do I need to change something in google_store_locator.info or other files? Would be nice to know the right way to do this because I maybe want to show more fields/info.

It's showed in node http://magnifascent.tinemuller.dk/ but not in Sidebar or InfoWindow http://magnifascent.tinemuller.dk/store_locator

NB: I use vers. 7.x-1.0-beta2 but don't think that's the problem.

michfuer’s picture

Status: Needs review » Closed (duplicate)

Consolidating this issue here

Horroshow’s picture

@ RKS
Can you be more specific? I added a field for an alternate phone number to the Location Export view and to the Store Location content type. Both are rendered in the view's output and in the node but it doesn't shows up in the sidebar at all. Do I have to edit something else?

RKS’s picture

Sorry. I had other problems with the module so I stopped using it a while ago. I don't remember anything specific that might be able to help you.

michfuer’s picture

@Horroshow: 7.x-1.0 supports adding a phone number, website, and miscellaneous properties to each Store Location. You shouldn't need to mess with the view or anything. Download and enable 7.x-1.0, run update.php and revert the Location Export view, and you should be good (assuming you've completed all the other installation instructions).

Horroshow’s picture

I managed to add a second phone number to the infowindow by editing a few .js script.

jalves’s picture

Hi,

i had this working before.. i've added the phone, email and url fields to store locator content type, then added the fields in the gsl view and they were apearing in the marker popup..
After i made the update they aren't showing anymore and when trying to run the update.php i have the following error:

google_store_locator module

Update #7102
Failed: DatabaseSchemaObjectExistsException: Table <em class="placeholder">field_data_gsl_props_misc</em> already exists. in DatabaseSchema->createTable() (line 657 of ....\includes\database\schema.inc).

How can i fix this?

jujudragon’s picture

I was able to add the phone number to the sidebar list and the box on the map by adding this code to the "rewrite results"

<div class="locator-address">
[gsl_addressfield-thoroughfare]
<br/>
[gsl_addressfield-locality], [gsl_addressfield-administrative_area], [gsl_addressfield-postal_code]
</div>
[gsl_props_phone]

But when I enter [gsl_props_web] the code shows up and not the link. Can anyone help me with this one?

Thanks!

laz0rama’s picture

Issue summary: View changes

i am running version 1.0 of this module, and i cannot get the phone number to display on the panel/sidebar. i have tried everything i saw here in various comments. the content type has the field, i have added it to the view, i have tried rewriting a custom text field, etc. i even reverted the view after reinstalling the module.

nothing i do in the view settings (eg, changing the description field to phone) has any effect on what i see in the panel/sidebar. i have cleared all caches.

anybody have any ideas?

laz0rama’s picture

after some debugging, i discovered that the field name for the phone number field was different between the google_search_locator.js file and what is exported in the json feed view. (also for the web field).