Booker docs.

Everything you need to install, style and run Booker on your Shopify store.

Docs/Getting started

Install the calendar by editing theme code

This is the alternative to the app block. Use it when your theme has no app blocks, or when you want to place the calendar by hand. It takes about ten minutes. The snippet goes in a theme code file and nowhere else.

Where the snippet goes, and where it does not

The snippet only works inside a theme code file. You reach those through Online Store, Themes, Edit code. It does not work in the product description, in a page, in a blog post, or in a theme "Custom HTML" block. Shopify does not run the {{ product.id }} part in those places, so the calendar never learns which product it is on and stays blank.

The product description editor in HTML view
Not here. The description editor cannot fill in the product id.

Open the theme code editor

  1. 1
    Go to your themes

    In your Shopify admin, click Online Store, then Themes.

  2. 2
    Make a copy to work on

    On the theme marked Current, click the three dots, then Duplicate. Edit the copy and publish it once the calendar works. Your live store is never half done.

  3. 3
    Open the code editor

    On the copy, click the three dots, then Edit code.

The three dots menu on a theme, with Edit code highlighted
Three dots, then Edit code

Paste the calendar into the product section

  1. 1
    Find the product section file

    In the list on the left, open the Sections group. On Dawn and most themes the file is main-product.liquid. On Horizon, Shopify's current default theme, it is product-information.liquid. If you are not sure, type "product" in the search box at the top of the list.

  2. 2
    Find the right line

    On Dawn, scroll until you see the block that draws the add to cart button, usually named buy_buttons. On Horizon, scroll near the bottom to the line that starts with {% render 'product-information-content'. Either way, the snippet goes on a new line right after it.

  3. 3
    Paste the snippet

    Paste the two lines below on their own lines, just after that block or render line.

  4. 4
    Save

    Click Save at the top right.

<booking-calendar data-proxy="/apps/booking" data-product-id="gid://shopify/Product/{{ product.id }}"></booking-calendar>
<script src="/apps/booking/embed.js" defer></script>
The Sections group in the theme code editor with the product section file selected
The product section file under Sections
The calendar snippet pasted just after the buy buttons block in the product section file
The snippet in place, right after the product section renders

Load the script on every page

A customer picks Saturday at 10 on a product page and goes to the cart. Booker holds that time for them while they pay. The cart guard keeps the hold valid on the cart page, and the cart page only has the script if theme.liquid loads it.

  1. 1
    Open theme.liquid

    In the list on the left, open the Layout group and click theme.liquid.

  2. 2
    Paste the script tag

    Scroll to the bottom of the file. Paste the one line below on its own line, just above </body>.

  3. 3
    Save

    Click Save at the top right.

<script src="/apps/booking/embed.js" defer></script>
theme.liquid open in the theme code editor with the script tag just above the closing body tag
One line, just above </body>

Check it on the store

Open a bookable product on your storefront. The calendar should show, with free days you can click. If the page shows nothing where the calendar should be, the snippet is in the wrong place. Go back to the product section file. Then hide your theme add to cart, buy now, price, quantity and variant pickers on bookable products, the same as in the app block article. The calendar replaces all of them. Colours and the book button are set in the app under Appearance. When everything works, publish the copy.

The booking calendar on a storefront product page
What a working install looks like

Good to know

When should I use this instead of the app block?

When your theme has no app blocks, or when you want to choose exactly where the calendar sits. If your theme has app blocks, the app block is quicker.

Do I need the script in two places?

Yes. In the product section file so the calendar loads, and in theme.liquid so the cart guard runs on the cart page.

Can I paste it into the product description?

No. The description editor does not run the {{ product.id }} part, so the calendar is sent a blank product and shows nothing.

The calendar is blank. What now?

Either the snippet is in the wrong place, or the product is not set up in Booker yet. The Products page in the app shows which products are set up. Then check the snippet is in the product section file, under Sections.

Do I need to repeat this when I switch theme?

Yes. Theme code belongs to one theme, so a new theme starts without it. Do these steps again on the new theme, or use the app block if the new theme has one.