Booking Widget opening Booking Page on Your Own Website

From Beds24 Wiki
Revision as of 15:41, 19 February 2014 by Annette (talk | contribs)
Jump to navigation Jump to search


By default a booking widget opens your secure booking page in a new window. You can add a redirect so the widget opens an embedded booking page on your own website. You can also change the widget so it stays in the same window.


1. Create the landing page

Include the booking page in an iFrame on your page. Make sure you are not specifying the number of guests or nights in the iFrame SRC. There are iFrame widgets available in SETTINGS -> BOOKING WIDGETS.


2. Create the Starting Widget

Generate the code for the widget you want to us in SETTINGS -> BOOKING WIDGETS. Paste it into your html and add the following code.

yourURL is your landing page URL on your web site which has your Beds24 booking page embedded.


  • Links

Add the following to the URL or HREF

&redirect=http://yourURL


If your URL contains & characters you will need to first url encode it with a tool like http://meyerweb.com/eric/tools/dencoder/

Remove the target="_blank" value from the link if you want the new page to stay in the same window.


  • Booking Box and other HTML forms

Add a hidden parameter as follows between the <form> and </form> tags

<input type='hidden' name='redirect' value='http://yourURL'>

Remove the target='_blank' from the form tag if you want the new page to open in the same window.


Wordpress

If you are using Wordpress you can set this up directly SETTINGS -> Beds24 in your WordPress backend (plugin version 2.03 or greater). In case you enter a booking widget pasting in code use the short code [beds24-landing] for your landing page. If you use shortcodes to add widgets use [beds24-embed].


How it works

This will work on any page hosted on the same or a different domain as the starting widget.

The Starting Widget opens the booking page with the redirect parameter.

The redirect parameter causes the booking page to store the included information such as checkin date and number of guests in a session and then immediately redirects the user back to the page specified with the redirect parameter.

If the booking page is included in an iFrame on the redirect page it will open with the values from the Starting Widget stored in the session.

The Iframe cannot redirect the user to secure payment due to the security settings in browsers. If you want to take deposit payments go to SETTINGS -> BOOKING PAGE -> ADVANCED and set "Open in new Window" to "On Secure Payment".