Why blocking checkout has to happen at Shopify, not in your theme

Hiding the checkout button closes the front door and leaves the back door open. Here's how Shabbify uses a Shopify checkout rule to stop orders on Shabbat for every shopper, on every device, and what each blocking option actually does.

· 3 min read · Shabbify team

There are two very different ways an app can "close" a Shopify store, and they are not equally good.

The easy way is in the theme: hide the add-to-cart button, grey out "Check out", put a banner across the page. It works for a shopper who loads your home page in a normal browser. It does nothing for a shopper who already has /checkout open in another tab, who reaches checkout through a link in an abandoned-cart email, who buys through a sales channel that doesn't use your theme, or whose browser has the app's script blocked. Shopify's checkout is its own system; your theme never sees it.

The right way is to tell Shopify itself not to accept the order.

What a checkout rule is

Shopify lets apps install checkout rules (built with Shopify Functions) that run inside Shopify's checkout every time a shopper tries to pay. A rule can say "this order isn't allowed" and give a reason. Shopify then refuses to continue and shows the shopper the message. There's no page for a shopper to bypass, because the check happens on Shopify's servers.

Shabbify ships one such rule, Shabbify – Close checkout. While your store is closed, every checkout attempt gets your closed message and the reopening time instead of a payment form. While the store is open, the rule does nothing.

The rule needs to be active in your store's checkout settings. Shabbify turns it on when you install the app, shows its real state in the app, and gives you a one-click button if it's ever off.

The blocking options, and what each one really does

Shabbify lets you combine four kinds of blocking. Here's what each one is, so you can choose on purpose:

Option Where it works What a shopper experiences
Block checkout Inside Shopify's checkout (the checkout rule) They can browse and fill a cart, but can't complete an order anywhere, on any device or channel
Block add to cart In your theme (needs the Shabbify app embed) Add-to-cart buttons are disabled with your message
Block the checkout button In your theme (needs the app embed) The cart's checkout button is disabled with your message
Block the entire site In your theme (needs the app embed) A full-page closed screen with your message, reopening time and countdown covers every page

The theme options are about what shoppers see. The checkout rule is about what Shopify allows. We recommend Block checkout for every store, with the theme options on top for the shopper experience you want. If you only pick a theme option, the app's Home page says so clearly, because that's a store that can still take orders.

What shoppers see at checkout

A shopper who reaches checkout during a closure doesn't get a blank error. Shabbify adds a banner at checkout with your message, the time you reopen, and a countdown, in the shopper's language where Shopify provides it. The same placeholders work as in your theme banner: [[opentime]] for the reopening time and [[countdown]] for the live countdown.

Keeping the sale

Blocking a sale isn't the same as losing it. Shoppers who visit while you're closed can leave their phone number in Shabbify's contact form or cart warning, and when you reopen, Shabbify triggers your Klaviyo flow to text them. The theme banner and the full-page closed screen both show exactly when you'll be back, which is what most shoppers want to know.

Checking it works

Ask Shopify Sidekick: "Why can customers still check out?" Shabbify runs through every condition (app on, store closed, rule active, blocking includes checkout) and reports the first one that fails, with a link to fix it. Or open the app's Home page, where the checkout rule's state is shown next to your blocking options.

  • checkout
  • guide

More from the blog

  • How Shabbify works out when to close your store

    Sunset, candle lighting, nightfall, chatzot, Israel versus the diaspora: how Shabbify turns your location and your minhag into the exact minutes your Shopify store closes and reopens.

  • Preview your closed store before Friday

    The Theme setup page now shows whether each Shabbify block is in your theme, and previews your banner, popups and closed screen with your own colours and text, on desktop and mobile, any day of the week.

  • Choose which store status emails you get

    Shabbify emails you when your store closes and reopens. You can now turn those emails off in Settings or from any email, and every automatic close and reopen is recorded in the activity log either way.

Ready for this Shabbat?

Install Shabbify free and follow the setup guide in your Shopify admin.

Install Shabbify free