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.

  • {todayhours}.  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.
  • {locationstatus}.  This displays "Open" or "Closed".  It's default styling includes a green or red font color, respectively.

These status indicators correctly consider the location's time zone, which is obtained during the geocoding process.

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="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.

Did this answer your question?