Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have this module up and working beautifully. I would love to be able to have a single textfield form in a block or within a node that would POST to the store locator page.
Is this doable?
Comments
Comment #1
PMorris CreditAttribution: PMorris commentedI'd like to do this too. I'm looking to make a block on my homepage with a search field linking to the store locator landing page. It would be nice to be able to add a big "Go" or "search" button instead of just hitting return to activate search too!
Hope this doesn't sound too much like a 'me too' post but I just want to show there is a demand for it.
Comment #2
lquessenberry CreditAttribution: lquessenberry commentedI would also like to do this. I am looking for a solution to this and will try to post back asap.
Comment #3
PMorris CreditAttribution: PMorris commentedI found you can do this with the Open layers locator module. It's a bit more complicated to set up but it works. See this thread:
https://drupal.org/node/2110239#comment-7967895
Comment #4
lquessenberry CreditAttribution: lquessenberry commentedI have installed the Google Store Locator module and imported several stores. I am wondering if there is a way to do something similar here that allows for the same functionality. I just got used to this module, and I would have to reconfigure a lot of modules and settings to use Open Layers Locator.
Comment #5
sui_page CreditAttribution: sui_page commentedI too am looking for a kind of block for the Google store locator. I was able to generate a half decent vesion of it, see here.
About halfway through the page you'll see the 'Find an Envirobank' form. While it does auto-search for locations after submitting you are directed to the 'Locator' page and then you have to re-insert the location for it to work.
Is there any way I can have this automatically search once it redirects to the 'Locator' page?
Comment #6
Ganganation CreditAttribution: Ganganation commentedHere are my first thoughts to this request. I've already got it working that I can retrieve GET data from the url and show my location on the map.
I know there are better ways to do this. But it is not yet finished.
First of all I add these lines in google_store_locator.module on line 313:
After that I created a new js file called google_store_locator_get_name in the directory js. This is the code:
Please feel free to give your feedback on this. Work still in progress.
There's probably a better approach. For now this works.
Comment #7
myl6858 CreditAttribution: myl6858 commentedWas someone able to solve this?
Comment #8
brian.seek CreditAttribution: brian.seek commentedI got the solution from #6 working good enough. Would be nice to combine that with the Location Awareness feature. As it is only one way will work. There are some bugs with the GET location when it first loads. It will focus the map correctly but won't display the nearest stores in the listing area.
Comment #9
eurotrash CreditAttribution: eurotrash commentedI took a different approach to solving this problem, not as elegant or flexible as #6, it might work for some situations so it is worth mentioning.
I wanted a subset of locations to be available on pages located below the main install. This approach only works because any url segments passed to the default location are ignored by the view, loading a blank map.
First I cloned the default page view, then filtered the results, and changed the url.
PATHS
--------------------------------------------------------------
/store-locator/ -- load all locations, default implementation of the view
/store-locator/group-one -- filtered cloned view, only loads stores form group 1
--------------------------------------------------------------
In the file "google_store_locator.js" around line 49 I added the following code:
Now you should see a map with a subset of markers at: /store-locator/group-1 . All features appear to work correctly.
Comment #10
phelix CreditAttribution: phelix commentedNevermind. I looked at an older version of this module and figured out where this info should be added at and it seems to be loading the JS file properly. I would just remove this post to not cloud things up but there is no option to do so.
Comment #11
srikanthgdk_drupal CreditAttribution: srikanthgdk_drupal commentedHow to make the nearest stores working from #6