I have 15 store locations, all of which appear on the map, but only 10 appear in the sidebar. Is it possible to increase the count so that all of my stores are listed in the sidebar too?

Comments

michfuer’s picture

Assigned: Unassigned » michfuer
AngryWookie’s picture

One thing to note on this, and it may be something you already know, is that the sidebar shows the 10 stores closest to the address currently entered. If you were to enter a different address you could come up with a different 10. I mention this just so you know that all 15 store items do show up in the list, it's just a matter of when they show up. That said though, it should definitely be an option as to how many are in that sidebar.

michfuer’s picture

That is an excellent point AngryWookie. Adding this feature requires overriding a function in the store-locator.compiled.js, and this will take a bit of time to integrate into our google_store_locator.js, but for anyone concerned it's good to note that the Panel displays the closest 10 stores (out of all your stores) to the user's chosen location.

AngryWookie’s picture

If you want a quick and dirty fix that can be performed right now, open up the store-locator.compiled.js file inside of libraries/storelocator/js and do a search for "10", it should find something like k=h.min(10,c[B]). Change the 10 to a 15 and voila, you now have all 15 stores in the list.

zach harkey’s picture

@AngryWookie, I actually pointed this out to my client thinking it was something only they were likely to notice. But it keeps getting reported as an issue by different people. So now I believe there is definitely a certain level of user expectation (albeit a misunderstanding) with this kind of "locator style" UI where it would benefit from having the number of stores in the side menu be a setting. Especially when you only have 15 or so stores on the map, it would be nice to raise the limit to include them all. For 200 stores, it might not be an issue.

For now, I may try the quick and dirty fix suggested in #4.

By the way, in case you were interested, here is the Google Store Locator being used in production:

https://www.abtexas.com/locations

Thanks for the great module!

michfuer’s picture

@Zach Harkey: Thanks for sharing the production site. Looks great!

zach harkey’s picture

Thanks michfuer, and thanks AngryWookie for the heads up, I think we have it rewriting properly now.

recrit’s picture

initial commit for the javascript side handling for the items per panel - http://drupalcode.org/project/google_store_locator.git/commit/f19d2c7
Pending - admin form and page callback updates

AngryWookie’s picture

Status: Active » Fixed

Just pushed a commit to allow for specifying how many items per panel as well as support for that in the page callback. Looks good in my testing but will not push as a beta version until further testing has been conducted.

http://drupalcode.org/project/google_store_locator.git/commit/ce850fe

zach harkey’s picture

Awesome.

It works perfectly for me. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.