logo

Agile Store Locator - Knowledge Base

How to Add Additional Time Slot in Store Locator?

Our plugin templates are highly customizable and also provide ability that users can add/remove/change attributes of stores in store list and info-window. Stores start and end Time appears in the frontend by default, but in case if user have more than one time slot per day, it can be shown by customizing the frontend view.

Image of Agile Store Locator Time Fields which appear by default

To add additional time slots in frontend view, we can use additional description field in Add New Store Form.

Image of Agile Store Locator Additional Description Field

For Example, our time slots for store "ABC Shop" is "Mon-Tue 8-12 / 13-18, Wed-Fri 8-12 / 14-18, Sat-Sun 2-12 / 15-18", we have to add it in additional description in this format.

Mon-Tue 8-12 / 13-18
Wed-Fri 8-12 / 14-18
Sat-Sun 2-12 / 15-18

br tag is using to break line

Once you have added the data in additional description field, now it's time to change the template frontend view, if you are using Template 0 you will have to modify template-frontend-0.php which is default template of store locator. Replace the existing lines with the new lines

{{if end_time && start_time}}<p class="p-time"><span class="glyphicon glyphicon-time"></span>{{:start_time}}-{{:end_time}}</p>{{/if}}

Templates lines that need to be replaced under "tmpl_list_item" script tag

{{if description_2}}<p class="p-time"><span style="float:left" class="glyphicon glyphicon-time"></span><span style="float:left" class="additional-time">{{:description_2}}</span></p>{{/if}}

New Lines for Additional Time slots field

Once the template is modified, refresh your store locator to see the changes.

Image of Store Locator Additional time Slots

How to Add it in the InfoWindow?

Once we have added Time in Additional Description, now we can easily make it appear on infoWindow as well, same as we did it for listing, search for script tag "asl_too_tip" and replace these lines.

{{if end_time && start_time}}<div class="p-time"><span class="glyphicon glyphicon-time"></span>{{:start_time}}-{{:end_time}}</div>{{/if}}

Templates lines that need to be replaced under "asl_too_tip" script tag

{{if end_time && start_time}}<div class="p-time"><span style="float:left" class="glyphicon glyphicon-time"></span><span style="float:left" class="additional-time">{{:description_2}}</span></div>{{/if}}

New Lines for Additional Time slots field in InfoWindow