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.
</div>
{% 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.