Search by

easyweek / craft-booking

Yevhen L.

Online appointment booking for Craft CMS with EasyWeek: a floating Book now button on every page and a booking form for your Twig templates.

Package info

github.com/easyweek/craft-booking-plugin

Homepage

Documentation

Type:craft-plugin

pkg:composer/easyweek/craft-booking

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-11-30 22:55 UTC

This package is auto-updated.

Last update: 2026-11-30 22:57:46 UTC


README

Craft CMS plugin that adds EasyWeek online appointment booking to your site: a floating "Book now" button on every page, a booking form for your Twig templates, a full booking page, and booking links. Clients book a service, a specialist and a free time without leaving your site.

The EasyWeek booking form opened on top of a website page

Install

  1. Install the plugin: open the Plugin Store in the control panel, search for EasyWeek Booking and install it. Or from the terminal:

    composer require easyweek/craft-booking
    php craft plugin/install easyweek-booking
  2. Copy your booking link from your EasyWeek account: Integrations and Apps › Booking Widget. It looks like https://booking.easyweek.io/your-company.

  3. Paste it into Booking link in Settings › Plugins › EasyWeek Booking and save.

The floating "Book now" button now shows in the corner of every page of the site. A click opens the booking form on top of the page. Nothing is added to the control panel.

Settings

Settings › Plugins › EasyWeek Booking.

Setting Key Default What it does
Booking link url empty Your EasyWeek booking link, starts with https://. Empty switches the widget off
Floating button floatingButton on Show the booking button in the corner of every page
Button text buttonText Book now The label of the button
Show the text next to the icon showText on Off shows the round icon only
Button position position right right for bottom right, left for bottom left
Button colour buttonBackground empty A hex colour such as #58B44B; empty keeps the EasyWeek green

A link that does not start with https://, an empty button text or a colour that is not a hex colour is not saved: the field shows what to correct and the saved settings stay as they were.

Config file

Like every Craft plugin, the settings can be set per environment in config/easyweek-booking.php, with the keys of the table:

<?php

use craft\helpers\App;

return [
    'url' => App::env('EASYWEEK_BOOKING_LINK'),
];

A setting from the config file is locked in the control panel, with a note under the field. The form does not check such a value: when it is not valid, the widget stays off and storage/logs gets a warning that says what to correct. A variable that is not set leaves the link empty, which switches the widget off.

Booking form in a template

Craft renders every page from your own Twig templates, so the plugin gives you a template function instead of a block or a field type.

Call Shows
{{ craft.easyweekBooking.form() }} The booking form inside the page
{{ craft.easyweekBooking.form({type: 'page'}) }} The booking form over the full height of the screen, for a separate booking page
{{ craft.easyweekBooking.form({type: 'button', text: 'Book now'}) }} A link that opens the booking form on top of the page. With a url of its own the link leads to that booking page
{{ craft.easyweekBooking.form({url: 'https://booking.easyweek.io/your-company/123/456'}) }} A location or a service straight away
{{ craft.easyweekBooking.form({width: 400, height: 700}) }} The embedded form in another size
Option Default What it does
type embed embed, page or button
url the saved booking link Any booking link format: a location, a service, a specialist, a gift card, a membership
width, height 550, 600 The size of the embedded form in pixels
text Book now The text of the link, for button
title Online booking The title of the form for screen readers

To let editors choose the form per entry, add fields of your own, for example a Dropdown with the values embed, page and button and a Link field, and pass them on:

{{ craft.easyweekBooking.form({
    type: entry.bookingFormType,
    url: entry.bookingLink,
}) }}

Field values go straight in, and an option that is empty takes its default: an empty Link field shows the saved booking link.

An option the form does not know, or a value it cannot use, throws an exception that names the option.

Any element of your templates with the class easyweek-booking-button opens the booking form too, for example a menu item.

Good to know

  • Where the scripts go. The plugin registers the widget with registerJsFile() and registerJs() for the end of the body. Craft prints them before </body>, or where your layout calls {{ endBody() }}. A template without </body>, for example one that returns JSON, gets nothing.
  • Who sees messages. When a form has no valid booking link, visitors see nothing. A signed-in administrator sees a short note in its place.
  • Several sites. Craft keeps the settings of a plugin once per project, so every site of a multi-site install gets the same button. The default text and title of the form follow the language of the site. For another booking link on one site, pass url in its templates.
  • Content-Security-Policy. Craft sends no Content-Security-Policy on site pages. If your web server or another plugin does, allow the host of your booking link in script-src and frame-src. The widget adds its own style element to the page, so a policy that forbids inline styles has to allow it as well.
  • Uninstall. Uninstalling the plugin removes its settings from the project config. Take the craft.easyweekBooking calls out of your templates first.

Requirements

Craft CMS 5.0 or newer, PHP 8.2 or newer, an EasyWeek account (online booking is part of every plan, the free one included). Tested on Craft CMS 5.12.4 with PHP 8.3.37 and MariaDB 11.8.10: install, settings, the three forms, uninstall.

Privacy

The plugin stores only its settings. The booking form and widget.js load from EasyWeek, the host of your booking link: when a visitor opens a page with the widget, their browser requests them from that host. When the address of a page carries campaign parameters (UTM tags, gclid), the widget script keeps them in the local storage of the visitor's browser under the key ew_tracking and passes them to the booking form, so that you see where a booking came from. Terms and policies: easyweek.io/business/terms-and-policies, privacy: easyweek.io/business/privacy.

About EasyWeek

EasyWeek is online booking and business management software for service businesses: beauty salons, barbershops, nail and lash studios, massage and spa, clinics, fitness and yoga studios, schools and rentals. More than 50,000 users run their bookings, clients, payments and reminders in it. All features: github.com/easyweek and easyweek.io/business/features. Support: support.easyweek.io.

More from EasyWeek on GitHub

License

MIT. Copyright EasyWeek GmbH. EasyWeek is a registered trademark of EasyWeek GmbH.