Store Locator

Hi All. Having trouble with the store locator add-on (version 2.10).



The admin interface only displays a total of 10 stores (that is, there’s no pagination when I add more than 10 stores). This means that, although I can ADD more than 10 stores to the store locator, I can’t VIEW or EDIT store numbers 11+ through admin (only the first 10 display in the admin panel).



Pagination seems to work fine on the other admin pages that I’ve tried (orders etc.) I’ve tried ajax pagination on or off (same problem).



Not sure if this results from any of my customisations (don’t think so). Has anyone else noticed this? Anyone successfully added more than 10 stores to the store locator and able to access them all through admin? Cheers

[quote name=‘3am’]Hi All. Having trouble with the store locator add-on (version 2.10).



The admin interface only displays a total of 10 stores (that is, there’s no pagination when I add more than 10 stores). This means that, although I can ADD more than 10 stores to the store locator, I can’t VIEW or EDIT store numbers 11+ through admin (only the first 10 display in the admin panel).



Pagination seems to work fine on the other admin pages that I’ve tried (orders etc.) I’ve tried ajax pagination on or off (same problem).



Not sure if this results from any of my customisations (don’t think so). Has anyone else noticed this? Anyone successfully added more than 10 stores to the store locator and able to access them all through admin? Cheers[/QUOTE]

Hi



We are also having the same problem. Can anyone help?



I also notice a limit in the database table cscart_store_location_descriptions of 255 chars. That can’t be right…can it?



Cheers

Hey Dean



I noticed that the file your skin/admin/addons/store_locator/manage.tpl is missing a call to the common_templates/pagination.tpl file. You could try adding that (provided a sloppy work-around for me).



e.g. {include file="common_templates/pagination.tpl"}

There are a few examples of different versions of the call to try in the manage.tpl files related to other add-ons. I’m no coder, and, personally, I’m not sure which version is best (there must be a code wizard here somewhere that can help). And I can’t be certain that the code addition hasn’t broken anything else (seems OK for me).



Also, I noticed that in my case I needed to add this as the first line of the skin/admin/addons/store_locator/manage.tpl. Hope that this helps mate. Cheers.

Has this been reported in the Bug Tracker?

[url]CS-Cart Community Forums



It won’t get fixed if we don’t tell the developers about the problem.



Bob

Thanks Bob. Reported now.

Cheers

Thanks 3am for finding the solution :smiley:



I have included the code for everyone’s sanity who has hit this problem.

The file can be found - skins/[your skin name]/admin/addons/store_locator/views/store_locator/manage.tpl



The edited lines are ended with




```php {* $Id: manage.tpl 7162 2009-03-31 10:08:36Z zeke $ *}



{script src=“js/picker.js”}

{include file=“addons/store_locator/pickers/map.tpl”}

{capture name=“mainbox”}

{include file=“common_templates/pagination.tpl”}


{foreach from=$store_locations item=loc}
{capture name="edit_picker"}
{include file="addons/store_locator/views/store_locator/update.tpl" loc=$loc}
{/capture}
{include file="common_templates/object_group.tpl" id=$loc.store_location_id text=$loc.name status=$loc.status href="" object_id_name="store_location_id" table="store_locations" href_delete="`$index_script`?dispatch=store_locator.delete&store_location_id=`$loc.store_location_id`" rev_delete="store_locations" header_text=`$lang.editing_store_location`: `$loc.name` content=$smarty.capture.edit_picker}

{foreachelse}

{$lang.no_data}



{/foreach}

{include file="common_templates/pagination.tpl"}

{capture name="tools"}
{capture name="add_new_picker"}
{include file="addons/store_locator/views/store_locator/update.tpl" mode="add" loc=""}
{/capture}
{include file="common_templates/popupbox.tpl" id="add_store_location" text=$lang.new_store_location content=$smarty.capture.add_new_picker link_text=$lang.add_store_location act="general"}
{/capture}
{include file="common_templates/popupbox.tpl" id="add_store_location" text=$lang.new_store_location link_text=$lang.add_store_location act="general"}

{/capture}
{include file="common_templates/mainbox.tpl" title=$lang.store_locator content=$smarty.capture.mainbox tools=$smarty.capture.tools select_languages=true} ```

Thanks Bob in the future I will ensure that I use the Bug Tracker?