All Collections
Fields
Location hours with "Open Now" indications
Location hours with "Open Now" indications
Bryan Nye avatar
Written by Bryan Nye
Updated over a week ago

MetaLocator includes the ability to indicate the "open" or "closed" status of a location based on the hours provided.  This can be displayed by the use of a few different templates. These templates can all be located under the Interface Builder -> Results -> Edit List -> Hours.

  • The base Hours template displays a table of hours from Sunday to Saturday.

  • Hours Collapse displays "Open", "Closed" message based on the locations time zone. It also includes "Opening Soon" and "Closing soon" messages which is defined as less than 1 hour. There is also a message with the full hours and a dropdown table of hours from Sunday to Saturday.

  • Hours Status displays just the "Open", "Closed", "Opening Soon", "Closing Soon" messages.

  • Lastly Hours Today indicates a "Open today from 9:00 am to 5:00 am" based on the data in the Hours field.

These status indicators correctly consider the location's time zone, which is obtained during the geocoding process.  If the time zone field is not populated, the time zone reverts to the user's time zone.  The time zone value is sometimes not populated when users import data with latitude and longitude already present.  This can also occur if the latitude and longitude data is coming from an external source such as Yext or SalesForce.  To re-instate the timezone data, simple re-geocode the locations.

To modify the language associated with these tags, the following constants are used:

LOCATOR_HOURS_STATUS_OPEN="Open Now"
LOCATOR_HOURS_STATUS_CLOSED="Closed"
LOCATOR_HOURS_STATUS_CLOSING_SOON="Closing soon"
LOCATOR_HOURS_STATUS_CLOSED_OPENS_NEXT="Opens next at %1$s on %2$s"
LOCATOR_HOURS_STATUS_OPEN_RANGE="Open today from %1$s to %2$s"

To edit or add these language constants, see this tutorial.

Legacy template instructions and tags can be include as needed according to the instructions found here.

  • {todayrthours}. This displays the hours for the current day in a textual format, as in "Open today from 9 to 5". It also includes when the location is open next, if it is currently closed, or if it is closing soon. "Soon" is defined as less than 1 hour.

  • {locationrtstatus}. This displays "Open" or "Closed". It's default styling includes a green or red font color, respectively.

Did this answer your question?