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 special template tags.

  • {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.

Update: {locationrtstatus} replaces {locationstatus} and {todayrthours} replaces {todayhours} and now uses javascript to display the location's status in real time.  This avoids issues where caching or a left-open browser window might display the location as closed when it has since opened.

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.

Include these template tags as needed according to the instructions found here.

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

LOCATOR_HOURS_STATUS_OPEN_RANGE="Open today from %1$s to %2$s"

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

Did this answer your question?