"Shop is closed" on specific days

A support request came in last week asking for a simple way to lock down the shop on the specific days, as the store isn’t open and pickups aren’t possible.

While a more fool-proof solution would be to restrict this server-side with a module, you can add a simple notice with just the twig templates:

    {% if "now"|date("N") == 3 %}
        <div class="c-cart-error">
            The store is closed on Wednesday. Orders placed today can be picked up tomorrow after 11am. 
    {% endif %}

The N date filter returns a number, starting at 1 for Monday (through 7 for Sunday), so the example above shows the notice only on Wednesdays.

1 Like

Any plans to have this kind of thing as a module that clients can manage from the Manager?
A ‘holiday mode’ to turn off the ability to buy products and/or add a notice for when delivery will be available?

It’s not on the immediate roadmap, but would make a cool module for sure. :slight_smile: