This snippet allows you to embed the Planyo reservation form on your web site.
This way, your clients will stay on your web site throughout the whole reservation process.
You can find more information about the integration process at your Planyo account. Once logged in, go to the
if you don't mind that your clients will be redirected to planyo.com to make a reservation,
you don't need to use this snippet at all.
First download the MODx component (
available here).
After downloading the component, unzip its contents into the
assets/snippets/planyo directory inside the main MODx directory. Once in the MODx admin panel, go to
Elements / Manage Elements / Snippets and click on
New Snippet.

In
Snippet name enter
planyo and paste the contents of
snippet.src.php into
Snippet code. Click
Save to save the new snippet.

The new snippet will appear in the list of installed snippets.

Now, you should choose the location for the Planyo form. Here we'll create a new web page. Of course you can use any existing location as well. In
Elements / Manage Elements click on the
New element icon.

Wherever you want the planyo form to appear, embed the snippet with the tag
[[!planyo? &site=`xyz`]] if running modx revolution or with the tag
[!planyo? &site=`xyz`!] if running modx evolution where
xyz is your Planyo site ID. If you don't have one, create a planyo account first, or you can embed the snippet without any parameters for testing purposes:
[[!planyo]] if running modx revolution or
[!planyo!] if running modx evolution. Note: Use
[[!planyo]] (modx revolution) or
[!planyo!] (modx evolution) instead of
[[planyo]] to disable caching. This is required when using the SEO-friendly mode (which is the default).

After inserting the planyo form on the chosen page, this form will display, depending on usage, an availability search form (with results), a reservation form, or other Planyo-related content required for the reservation process. After choosing one of the widgets available in the next step of the tutorial (Availability search box, Calendar preview or 'Make reservation' button) you should enter the URL of the page with the planyo form (e.g. http://myserver.com/my_reservations.php) in the URL of the reservation page on your website field. This way, using any of these widgets will keep the visitor on your website (to be more specific, on the page with the planyo form) throughout the reservation process.