Stay up to date with the ProductGraph Blog

Creating Time Based Messaging Like 'Call now, we're open' in Shopify

Many Shopify stores would like to have different messaging for different times of the days.  The most common scenario is a message for the customer to call the store when the store is open and to email when the store is closed.  Here's the instructions on how to do that in Shopify with Liquid

You've seen that useful promo on other store's that tells the customer to call when the store is open. Here's an example of the promo:

Business-Hours-Message.jpg

And then when the store is closed, the messaging is changed to something like this:

Shop-Closed-Message.jpg

Well, here's the liquid code to make that happen.  This view is from within the Shopify theme editor, which does a good job of color coding elements so its easier to read.  Notes are included to help you understand how it works.
Business-Hours-Liquid-Code.jpg

One thing to note here is that we are doing this in Liquid (we could also do it it in Javascript).  Liquid is processed on the Shopify servers and then used to render the HTML and other assets to the customer's browser.  So the time and date that you will be getting is from Shopify's servers.

Hope this helps!


ProductGraph is a certified Shopify Expert.  If you need any help with your Shopify store, we can help.

Learn More

Topics: Shopify