Search by

easyweek / module-booking

Yevhen L.

EasyWeek online appointment booking for Magento 2: a floating Book now button on every storefront page and a booking form widget for CMS pages and blocks.

Package info

github.com/easyweek/magento-booking-module

Homepage

Documentation

Type:magento2-module

pkg:composer/easyweek/module-booking

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-11-30 23:38 UTC

This package is auto-updated.

Last update: 2026-11-30 23:41:39 UTC


README

Magento 2 module that adds EasyWeek online appointment booking to your store: a floating "Book now" button on every storefront page, a booking form inside any CMS page or block, a full booking page and booking links. Clients book a service, a specialist and a free time without leaving your store.

The EasyWeek booking form opened on top of a website page

Install

  1. In the root folder of your store run:

    composer require easyweek/module-booking
    bin/magento module:enable EasyWeek_Booking
    bin/magento setup:upgrade
    bin/magento cache:flush

    In production mode also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy.

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

  3. In the Admin open Stores › Settings › Configuration › Services › EasyWeek Booking, paste the link in Booking link and save.

  4. Refresh the page cache: System › Tools › Cache Management, Page Cache, or bin/magento cache:clean full_page.

The floating "Book now" button now shows in the corner of every storefront page. A click opens the booking form on top of the page.

Until the package is on Packagist, add the repository first: composer config repositories.easyweek-booking vcs https://github.com/easyweek/magento-booking-module.

Settings

Setting What it does
Booking link Your EasyWeek booking link. It must start with https://. While it is empty the module adds nothing to the storefront
Floating button Show the booking button in the corner of every page
Button text The label of the button. It cannot be empty
Show the text next to the icon Show the label next to the round icon
Button position Bottom right or bottom left
Button colour A hex colour such as #58B44B; empty keeps the EasyWeek green

Every setting can be saved for the default scope, for a website or for a store view, so each store view can have its own booking link and its own button text. The default text "Book now" and the default form title "Online booking" show in the language of the store view; German is included.

A value that is not valid is not saved, and the Admin shows what to correct, for example "The booking link must start with https://, for example https://booking.easyweek.io/your-company." bin/magento config:set easyweek_booking/general/url <link> runs the same check.

After a change of the settings

Cached storefront pages keep the old button until the page cache is refreshed. When you save a setting, Magento marks the cache types as invalidated and shows its notice "One or more of the Cache Types are invalidated". Refresh Page Cache in System › Tools › Cache Management, or run bin/magento cache:clean full_page. After a change of the booking link the notice also names Blocks HTML output: Magento keeps the script hosts of a page next to its cached blocks, so refresh it as well (bin/magento cache:clean block_html full_page).

Booking form inside a page

In a CMS page or a CMS block (Content › Elements › Pages or Blocks) click Insert Widget... and choose EasyWeek booking form. With Page Builder the button is in the HTML Code element.

Option What it does
Show as Booking form inside the page (default), booking form over the full height of the screen, or a link that opens the booking form
Booking link Empty uses the link from the settings. A deeper booking link opens a location, a service, a specialist, a gift card or a membership straight away
Width, Height The size of the form inside the page in pixels, 550 by 600 by default
Link text The text of the link, "Book now" by default. A link to the saved booking link opens the form on top of the page; a link with a booking link of its own leads to that booking page
Form title The title screen readers announce, "Online booking" by default

Developers can write the directive by hand. The option is called display, because type is the block class in a Magento widget directive:

{{widget type="EasyWeek\Booking\Block\Widget\BookingForm"}}
{{widget type="EasyWeek\Booking\Block\Widget\BookingForm" display="page"}}
{{widget type="EasyWeek\Booking\Block\Widget\BookingForm" display="button" text="Book now"}}
{{widget type="EasyWeek\Booking\Block\Widget\BookingForm" url="https://booking.easyweek.io/your-company/123/456" width="400" height="700" title="Book a visit"}}

Without a valid booking link the widget shows nothing. A widget with options that are not valid (a display other than embed, page or button, a width or height that is not a number of pixels) shows nothing either and writes a warning to var/log/system.log. The storefront has no notice for administrators: Magento keeps the Admin session apart from the storefront and caches storefront pages for all visitors.

Any element with the class easyweek-booking-button opens the booking form, for example a menu item. This works with the floating button switched off as well.

Content Security Policy

Magento sends a Content Security Policy for the storefront, in report-only mode by default and in restrict mode on the checkout. The module adds the host of your booking link to script-src and frame-src on every storefront page, in both modes and also for pages served from the page cache; you do not need a csp_whitelist.xml. The host of a widget with a booking link of its own is added on the page that holds the widget. The script that starts the widget is rendered with Magento's SecureHtmlRenderer, which adds a nonce when your policy forbids inline scripts.

When analytics tools are connected to the booking form in your EasyWeek account (Google Analytics, Google Tag Manager, Meta Pixel, Cookiebot), widget.js loads their scripts on your pages. In restrict mode allow those hosts in your own csp_whitelist.xml.

Requirements

  • Magento Open Source or Adobe Commerce 2.4.7, 2.4.8 or 2.4.9, or Mage-OS built on them, with a PHP version that release supports (PHP 8.2 to 8.5)
  • An EasyWeek account: online booking is part of every plan, the free one included

Tested on Mage-OS 4.0.0, the open distribution built on Magento Open Source 2.4.9, with PHP 8.5.13, MariaDB 11.8.10, OpenSearch 3.10.1 and nginx 1.30, in developer and in production mode with the built-in page cache: install with Composer, settings, the widget, Content Security Policy headers, disabling and uninstalling. Magento 2.4.7 and 2.4.8, Adobe Commerce and Varnish were not run.

Uninstall

Run bin/magento module:uninstall --remove-data EasyWeek_Booking; --remove-data deletes the settings of the module. In production mode run bin/magento setup:di:compile afterwards. Widgets "EasyWeek booking form" that stay in your CMS pages and blocks show nothing once the module is disabled or removed; delete them when you tidy up the content.

Privacy

The module stores only its settings. It sets no cookie and collects no data in your store. The booking form and widget.js load in the browser of the visitor from EasyWeek, the host of your booking link (booking.easyweek.io for most companies). The module does not copy or proxy widget.js. 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.

Development

From the root of a Magento installation with the module in vendor/:

vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 --ignore-annotations vendor/easyweek/module-booking
vendor/bin/phpstan analyse -c vendor/easyweek/module-booking/phpstan.neon.dist
vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/easyweek/module-booking/Test/Unit

The first command is the one the Adobe Commerce Marketplace runs; it needs magento/magento-coding-standard. Translations are in i18n/, texts for the Adobe Commerce Marketplace in catalog/. Notes for coding agents: AGENTS.md.

More from EasyWeek on GitHub

License

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