Difference between revisions of "Category:Developers"

From Beds24 Wiki
Jump to navigation Jump to search
(42 intermediate revisions by 4 users not shown)
Line 4: Line 4:
 
[[Category:Widgets]]
 
[[Category:Widgets]]
 
[[Category:Booking Page]]
 
[[Category:Booking Page]]
[[Category:How to]]
+
[[Category:Booking_Engine]]
[[Category:Wordpress]]
+
<div class="heading">Developer Options</div>
  ''This page is about the menu SETTINGS -> BOOKING PAGE -> DEVELOPERS''
+
  This page is about the menu {{#fas:cog}} (SETTINGS) > BOOKING ENGINE > PROPERTY BOOKING PAGE > DEVELOPERS
Code snippets for the booking page are available in SETTINGS->BOOKING PAGE.
 
  
The booking page can be embedded in a page using an iframe or opened with a link or form.  It  can be fully customised in SETTINGS->BOOKING PAGE. This  [[Customise_Booking_Page|page]] gives an overview. Additional options for developers are:
+
The booking page can be embedded in a page using an Iframe or opened with a link or form.  It  can be fully customised in This page is about the menu {{#fas:cog}} (SETTINGS) > BOOKING ENGINE. This  [[Customise_Booking_Page|page]] gives an overview. Additional options for developers are:
  
 
== Custom Text ==
 
== Custom Text ==
Any fixed text on the booking page can be exchanged in SETTINGS->BOOKING PAGE ->DEVELOPERS "Custom Text"
+
Any fixed text on the booking page can be exchanged in This page is about the menu {{#fas:cog}} (SETTINGS) > BOOKING ENGINE  >  PROPERTY BOOKING PAGE > DEVELOPER > "Custom Text"
 +
 
 +
For more information please read the context help (?).
  
 
== Custom CSS ==
 
== Custom CSS ==
  
*Custom CSS can be added in SETTINGS->BOOKING PAGE ->DEVELOPERS "Custom CSS"
+
<span class="" style="color: #f3e504; font-size: 250%;" >{{#fas:lightbulb}} </span> Custom CSS can be added in This page is about the menu {{#fas:cog}} (SETTINGS) > BOOKING ENGINE PROPERTY BOOKING PAGE > DEVELOPERS > "Custom CSS"
 
 
=== Bigger room name ===
 
/*code for bigger room name*/
 
.at_roomnametext{
 
font-size: 14px /*if you want the text even bigger use a higher number*/
 
}
 
 
 
=== Disable click on calendar===
 
.roomoffercalendarmonth{
 
  pointer-events: none;
 
}
 
 
 
  .monthcalendarhead{
 
  pointer-events: auto;
 
}
 
 
 
=== Mark dates when check-out is not allowed (i.e. for rentals on a weekly basis===
 
To use this option you will need to set your check-in / check-out rules in the CALENDAR. It will not work for check-in and check-out restrictions only set in rates.
 
 
 
NOTE: Limit the check-in and check-out in the CALENDAR (click on "Override") to use this function.
 
 
 
.datenco{
 
background-color: #f4f4f4;
 
color: #cccccc;
 
}
 
 
 
=== Background Image  ===
 
To use a background image upload it to SETTINGS -> BOOKING PAGE -> PICTURES. Replace https://www.beds24.com/pic/p0000/2049/04.jpg with the url of your uploaded picture.
 
 
 
/*code fo use an image as background*/
 
body {
 
background-image:url(https://www.beds24.com/pic/p0000/2049/04.jpg);
 
}
 
 
 
=== Shadow Around your Booking Page (Adaptive Booking Page Only)===
 
 
 
Add code in SETTINGS-> BOOKING PAGE -> DEVELOPERS "Custom CSS"
 
 
 
/*code for a shadow around your booking page*/
 
 
 
  <nowiki>#</nowiki>bookingpage {
 
-webkit-box-shadow:0 1px 2px rgba(0, 10, 10, 0.38);
 
-moz-box-shadow:0 1px 2px rgba(0, 10, 10, 0.38);
 
  box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.1);
 
box-shadow: 0 1px 2px rgba(0, 10, 10, 0.38);
 
margin-bottom: 20px;
 
}
 
 
 
=== Booking Page with Rounded Corners  (Adaptive Booking Page Only)===
 
Add code in SETTINGS-> BOOKING PAGE -> DEVELOPERS "Custom CSS"
 
 
 
/*code for rounded corners*/
 
<nowiki>#</nowiki>bookingpage {
 
border-radius: 7px;
 
-webkit-border-radius: 7px;
 
-moz-border-radius: 7px;
 
}
 
 
 
=== Hide cents===
 
 
 
.bookingpagecents {display:none;}
 
 
 
=== Show prices with cents even if cents are zero ===
 
 
 
.bookingpagecentshide {display:inline;}
 
 
 
=== Mark certain days of the week ===
 
Example 1: Change the background color for Saturday
 
 
 
.daySat {color:#c44a2f !important;}
 
 
 
exchange daySat by daySun, dayMon, dayTue, dayeWed, dayThu, dayFri to exchange the backgound color for other days.
 
  
Example 2: Change the background color for Saturday
+
To see a list of CSS examples look into this document: [[Custom_CSS|Custom CSS]]
 
 
.daysat {background-color:#ccc !important;}
 
 
 
exchange daysat by daysun, daymon, daytue, dayewed, daythu, dayfri to exchange the backgound color for other days.
 
 
 
Example 3: Add a border arround Saturday
 
 
 
.daysat {border:1px solid #999999 !important;}
 
 
 
exchange daysat by daysun, daymon, daytue, dayewed, daythu, dayfri to exchange the backgound color for other days.
 
 
 
=== Add a border around the selected dates===
 
.datestay {border: 1px solid #2f2f2f !important;}
 
 
 
=== Line through unavailable dates===
 
.datenotavail {
 
text-decoration: line-through;
 
}
 
 
 
=== Change width of hover image (adaptive booking page only===
 
.ui-tooltip {
 
  max- width: 500px;}
 
 
 
=== Remove the hover effect on pictures (adaptive booking page only)===
 
img {
 
pointer-events: none;
 
}
 
 
 
=== Add a label above the room selector for multiple room bookings (responsive booking page only)===
 
.roomofferqtyselectlabel {
 
display: block;}
 
 
 
=== Hide up button (responsive booking page only)===
 
footer .button{
 
display: none;
 
}
 
 
 
=== Add icons to descriptive texts (responsive booking page only)===
 
[https://getbootstrap.com/docs/3.3/components/#glyphicons Bootstrap glyphicons] and [http://fontawesome.io/icons/ Font Awesome icons] can be added to the descriptive fields. To add icons the editor needs to be set to "Source"
 
 
 
Examples:
 
 
 
<nowiki><span class="glyphicon glyphicon-user" aria-hidden="true"></span>
 
</nowiki>
 
will add a Bootstap  icon for a person.
 
 
 
<nowiki><i class="fa fa-bicycle" aria-hidden="true"></i>
 
</nowiki>
 
will add a Font Awesomeicon for a bicycle.
 
 
 
Note: Icons might disappear when the editor is opened again. In this case you will need to enter it again.
 
 
 
=== Hide icons (responsive booking page only)===
 
.b24fa{
 
display: none;
 
}
 
 
 
#b24scroller .input-group-addon{
 
display: none;
 
}
 
 
 
=== Change text color of language selector and currency selector (responsive booking page only)===
 
#topofthebookingpage{
 
color: #ffffff
 
}
 
 
 
exchange ffffff with the hex code of the color you want to use.
 
 
 
=== Make language selector and currency selector a button (responsive booking page only)===
 
.b24languagedropdown .btn, .b24languagedropdown .btn.active, .b24languagedropdown .btn:active, .b24currencydropdown .btn, .b24currencydropdown .btn.active,        .b24currencydropdown.btn:active {
 
background: white;
 
padding: 10px;
 
}
 
  
 
== External CSS file ==
 
== External CSS file ==
 
It is possible to make the booking page use a CSS file that you supply, you must host the CSS file on a secure web server (using https:).
 
It is possible to make the booking page use a CSS file that you supply, you must host the CSS file on a secure web server (using https:).
  
To do this you need to add the &cssfile parameter to the URL for the booking page, or for example the iframe SRC.
+
To do this you need to add the &cssfile parameter to the URL for the booking page, or for example the Iframe SRC.
  
 
You could do this to use different styling per page or site.
 
You could do this to use different styling per page or site.
Line 175: Line 31:
 
https://yoursite/path/your.css
 
https://yoursite/path/your.css
  
Goto this site and encode it:
+
Go to this site and encode it:
 
http://meyerweb.com/eric/tools/dencoder/
 
http://meyerweb.com/eric/tools/dencoder/
  
Line 182: Line 38:
  
 
Your CSS file will be included.
 
Your CSS file will be included.
Note:
+
 
  The external stylesheet needs to be hosted on a secure site (https) to be accepted by the secure Beds24 booking page.
+
<span class="" style="color: #f3e504; font-size: 250%;" >{{#fas:lightbulb}} </span> The external stylesheet needs to be hosted on a secure site (https) to be accepted by the secure Beds24 booking page.
  
  
Line 189: Line 45:
  
 
== Javascript ==
 
== Javascript ==
* Javascript can be entered in SETTINGS->BOOKING PAGE ->DEVELOPERS"Advanced HTML Settings"
+
Javascript can be entered in This page is about the menu {{#fas:cog}} (SETTINGS)> BOOKING ENGINE  > PROPERTY BOOKING PAGE > DEVELOPERS or in {{#fas:cog}} (SETTINGS) >BOOKING ENGINE > MULTI BOOKING PAGE> DEVELOPER "Advanced HTML Settings"
 +
 
 +
=== Redirects ===
 +
For example: this would cause property 1234 to open in the parent window (frame busting) when it's book button is clicked on the multiple property page
 +
 
 +
<script>
 +
$(document).ready(function(){
 +
$('#propid1234 a').attr('target', '_parent');
 +
});
 +
</script>
 +
 
 +
<span style="color: #f3e504; font-size: 250%;" >{{#fas:lightbulb}} </span> Check the settings under  {{#fas:cog}} (SETTINGS) >BOOKING ENGINE  >  PROPERTY BOOKING PAGE > BEHAVIOUR before you add such a script.
 +
 
 +
=== Change the title text ===
 +
Javascript to change the titletext.
 +
 
 +
<script>document.title='your title';</script>
 +
 
 +
=== Change date format to American ===
 +
Javascript to change the date format.
  
== Booking Page Parameters ==
 
  
*The behavior of the booking page can be controlled with the following parameters passed in the URL or form. URL Parameters are always added in the format name=value. To separate them, the first parameter must have a ? before it and all following parameters must have an & before them. For example if you want to change the default for the numbers of night selector to 7 nights you change the link to your booking page from
+
<script>
 +
$(document).ready(function(){
  
https://www.beds24.com/booking2.php?propid=2047
+
$('#inputcheckin').data('date-format','MMMM DD, YYYY');
 +
$('#inputcheckout').data('date-format','MMMM DD, YYYY');
 +
})
 +
</script>
  
to
+
<script>
 +
window.onload = function() {
 +
$("[id^='ptdate']").text(function(i, t) {
 +
return t.split(' ').reverse().join(' ');
 +
})
 +
};
  
https://www.beds24.com/booking2.php?propid=2047&numnight=7
+
window.onunload = function(){};
 +
</script>
  
 +
== Booking Page Parameters ==
  
'''Example: hide header'''
+
The behavior of the booking page can be controlled with the following parameters passed in the URL or form. URL Parameters are always added in the format name=value. To separate them, the first parameter must have a ? before it and all following parameters must have an & before them. For example if you want to change the default for the numbers of night selector to 7 nights you change the link to your booking page from
  
https://www.beds24.com/booking2.php?propid=2047
+
https://beds24.com/booking2.php?propid=2047
  
 
to
 
to
  
https://www.beds24.com/booking2.php?propid=2047&hideheader=yes
+
https://beds24.com/booking2.php?propid=2047&numnight=7
 +
 
  
 
Example: Make a booking page for selected rooms only
 
Example: Make a booking page for selected rooms only
Line 214: Line 100:
 
Use the propid to open the page and add &hideroom=22543 to hide a room. You can hide multiple rooms by comma separating them.
 
Use the propid to open the page and add &hideroom=22543 to hide a room. You can hide multiple rooms by comma separating them.
  
https://www.beds24.com/booking2.php?propid=2048&hideroom=3589,3588
+
https://beds24.com/booking2.php?propid=2048&hideroom=3589,3588
  
  
 
'''Example: link to the booking page with dates pre populated:'''
 
'''Example: link to the booking page with dates pre populated:'''
  
https://www.beds24.com/booking2.php?propid=13437&checkin=2017-8-24&numnight=3
+
https://beds24.com/booking2.php?propid=13437&checkin=2017-8-24&numnight=3
  
 
exchange these values with your data:
 
exchange these values with your data:
Line 230: Line 116:
 
'''Example: Link to a booking form with dates and room pre populated:'''
 
'''Example: Link to a booking form with dates and room pre populated:'''
  
https://www.beds24.com/booking2.php?checkin=2017-8-24&numnight=3&numadult=2&numchild=0&br1-32919=Book&roomid=32919
+
https://beds24.com/booking2.php?checkin=2017-8-24&numnight=3&numadult=2&numchild=0&br1-32919=Book&roomid=32919
  
 
exchange these values with your data:
 
exchange these values with your data:
Line 250: Line 136:
 
Create a URL like this:
 
Create a URL like this:
  
https://www.beds24.com/booking2.php?propid=13434&checkin_hide=2016-11-24&numnight=2&numadult=1&br1-32906=Book
+
https://beds24.com/booking2.php?propid=13434&checkin_hide=2016-11-24&numnight=2&numadult=1&br1-32906=Book
  
 
You need to define:
 
You need to define:
Line 269: Line 155:
 
| '''Parameter''' || '''Value'''    ||'''Description'''
 
| '''Parameter''' || '''Value'''    ||'''Description'''
 
|-
 
|-
| https://www.beds24.com/booking.php  || Path to booking page        ||At the very minimum there must also be one of propid, roomid or ownerid parameter
+
| https://beds24.com/booking.php  || Path to booking page        ||At the very minimum there must also be one of propid, roomid or ownerid parameter
  
 
|-
 
|-
| roomid || id number of room. || The page will open showing this room.  
+
| advancedays  || number of days  || This will set the initial date to this many days in advance of today. Only applies the first time the page is opened. If advancedays is not used the initial date will be the current date. The first date with availability can be specified by setting advancedays to the value -1.
  
 
|-
 
|-
| propid || id number of property. || The page will open showing this property.
+
| checkin || check-in full date || The page will open at this check-in date
 
 
  
 
|-
 
|-
| ownerid || id number of owner.  || The page will open showing all properties and rooms for this owner
+
| cssfile  ||encoded url || External css file for inclusion in booking page, the file must be available via a secure url (https) and the url must be url encoded. (http://meyerweb.com/eric/tools/dencoder/)
  
 
|-
 
|-
| checkin || check-in full date || The page will open at this check-in date
+
| cur  ||AUD, CAD, EUR, GBP, NZD, USD, BGN, BRL, CHF, CNY, CZK, DKK, EEK, HKD, HRK, HUF, IDR, INR, JPY, KRW, MXN, MYR, NOK, PHP, PLN, RON, RUB, SEK, SGD, THB, TRY, VND, ZAR|| Opens the page showing the currency converted. (responsive booking page only)
 
 
|-
 
| mobile=0  || desktop view  || Display the booking page in desktop view
 
 
 
  
 
|-
 
|-
Line 299: Line 180:
 
|-
 
|-
 
| fdate_year || check-in year || The page will open at this check-in date, must be used with fdate_date and fdate_month and be in the format YYYY
 
| fdate_year || check-in year || The page will open at this check-in date, must be used with fdate_date and fdate_month and be in the format YYYY
 +
  
 
|-
 
|-
| mobile=1 || mobile view || Display the booking page in mobile view
+
| group  || keyword || Show only properties that have this group keyword
 +
 
 +
|-
 +
| hidefooter ||yes, no  || Do not show the property information at the bottom of the page
  
 
|-
 
|-
| numnight || number of nights || Initial value for the number of nights selector
+
| hideheader ||yes, no || Do not show the property information at the top of the page. Do not use this option when using a "Full Width Slider".
 +
 
  
 
|-
 
|-
| numadult || number of adults || Initial value for the number of adults selector
+
| hideoffer ||1,2,3,4 || Do not show this offer on the booking page, multiple id's can be specified with a comma separating them.
  
 
|-
 
|-
| numchild || number of children || Initial value for the number of children selector
+
| hideprop ||property id || Do not show this property on the booking page, multiple id's can be specified with a comma separating them.
  
 
|-
 
|-
| width || page width in px || Useful for embedding the booking page in an iframe of fixed size
+
| hideroom  ||room id || Do not show this room on the booking page, multiple id's can be specified with a comma separating them.
  
 
|-
 
|-
| numdisplayed || number of nights with prices displayed || Only applies to price table pages, use this to reduce the number of nights for narrow designs
+
| invoicee || integer ||Charges and payments will be assigned to this invoicee ID.
  
 
|-
 
|-
| referer || text ||This text will be recorded with any bookings originating from this widget allowing tracking of booking sources
+
| lang ||en (English), ar (Arabic), bg (Bulgarian), ca (Catalan), hr (Croatian), cs (Czech), da (Danish), de (German),  el (Greek),  es (Spanish), et (Estonian),  fi (Finnish),  fr (French),  he (Hebrew), hu (Hungarian), id (Indonesian - Bahasa Indonesia), is (Icelandic), it (Italian), ja (Japanese), ko (Korean), lt (Lithuanian), lv (Latvian) mn (Mongolian), my (Burmese), nl (Dutch), no (Norwegian), pl (Polish), pt (Portuguese), ro (Romanian), ru (Russian),  sk (Slovak), sl (Slovenian), sr (Serbian), sv (Swedish), th (Thai), tr (Turkish), vi (Vietnamese),  zh (Chinese simplified),  zt (Chinese traditional) || Sets the default language to open the booking page. (2013 new style booking pages only)
  
 
|-
 
|-
| invoicee || text ||Charges and payments will be assigned to this invoicee.
+
| layout ||1, 2, 3, 4, 5, 6, || Opens the responsive version of the booking page in this layout.
 +
 
  
 
|-
 
|-
| advancedays || number of days  || This will set the initial date to this many days in advance of today. Only applies the first time the page is opened. If advancedays is not used the initial date will be the first date with availability.
+
| maxprop ||number of properties || Show a maximum of this many properties based on the sort order. Additional properties are hidden.
 +
 
  
 
|-
 
|-
| layout ||1, 2, 3, 4, 5, 6,  || Opens the responsive version of the booking page in this layout.
+
| maxroom ||number of rooms || Only show a maximum of this many rooms based on the sort order. Additional rooms are hidden.  
  
 
|-
 
|-
| hideheader  ||yes, no || Do not show the property information at the top of the page
+
| mobile=1 || mobile view || Display the booking page in mobile view
  
 
|-
 
|-
| hidefooter ||yes, no || Do not show the property information at the bottom of the page
+
| mobile=0 || desktop view || Display the booking page in desktop view
  
 
|-
 
|-
Line 340: Line 228:
  
 
|-
 
|-
| lang ||en (English), ar (Arabic), bg (Bulgarian), ca (Catalan), hr (Croatian), cs (Czech), da (Danish), de (German), el (Greek),  es (Spanish), et (Estonian),  fi (Finnish),  fr (French), he (Hebrew), hu (Hungarian), it (Italian), ja (Japanese), lt (Lithuanian), mn (Mongolian), my (Burmese), nl (Dutch), no (Norwegian), pl (Polish), pt (Portuguese), ru (Russian),  sk (Slovak), sl (Slovenian), sr (Serbian), sv (Swedish), th (Thai), tr (Turkish), zh (Chinese) || Sets the default language to open the booking page. (2013 new style booking page only)
+
| numnight || number of nights || Initial value for the number of nights selector
 +
 
 +
|-
 +
| numadult || number of adults || Initial value for the number of adults selector
  
 
|-
 
|-
| hideprop ||property id || Do not show this property on the booking page, multiple id's can be specified with a comma separating them.
+
| numchild || number of children || Initial value for the number of children selector
 +
 
  
 
|-
 
|-
| maxprop ||number of properties || Show a maximum of this many properties based on the sort order. Additional properties are hidden.
+
| numdisplayed || number of nights with prices displayed  || Only applies to price table pages, use this to reduce the number of nights for narrow designs
  
 
|-
 
|-
| hideroom ||room id  || Do not show this room on the booking page, multiple id's can be specified with a comma separating them.
+
| nogroup || keyword || Exclude properties that have this group keyword
 +
 
  
 
|-
 
|-
| maxroom  ||number of rooms || Only show a maximum of this many rooms based on the sort order. Additional rooms are hidden.
+
| ownerid || id number of owner.  || The page will open showing all properties and rooms for this owner
  
 
|-
 
|-
| hideoffer  ||1,2,3,4  || Do not show this offer on the booking page, multiple id's can be specified with a comma separating them.
+
| propid || id number of property. || The page will open showing this property.  
  
 
|-
 
|-
| group || keyword || Show only properties that have this group keyword
+
| redirect ||encoded url || Redirect to this url, must start with http:// or https:// and be url encoded with a tool like http://meyerweb.com/eric/tools/dencoder/. The booking details are stored in session variables and will be available available to a booking page in an Iframe at your redirect URL as long as the Iframe is not overriding them in it's src url.
  
 
|-
 
|-
| nogroup || keyword || Exclude properties that have this group keyword
+
| referer || text  ||This text will be recorded with any bookings originating from this widget allowing tracking of booking sources
  
 
|-
 
|-
| cssfile  ||encoded url || External css file for inclusion in booking page, the file must be available via a secure url (https) and the url must be url encoded. (http://meyerweb.com/eric/tools/dencoder/)
+
| roomid || id number of room. || The page will open showing this room.  
  
 
|-
 
|-
| cur  ||AUD, CAD, EUR, GBP, NZD, USD, BGN, BRL, CHF, CNY, CZK, DKK, EEK, HKD, HRK, HUF, IDR, INR, JPY, KRW, MXN, MYR, NOK, PHP, PLN, RON, RUB, SEK, SGD, THB, TRY, VND, ZAR|| Opens the page showing the currency converted. (responsive booking page only)
+
| toproom || room always shown on the top of the bookingpage  || you can add mulitpel room IDs separated by a comma (resposive booking page only)  
  
 
|-
 
|-
| redirect  ||encoded url || Redirect to this url, must start with http:// or https:// and be url encoded with a tool like http://meyerweb.com/eric/tools/dencoder/. The booking details are stored in session variables and will be available available to a booking page in an iFrame at your redirect URL as long as the iFrame is not overriding them in it's src url.
+
| width || page width in px  || Useful for embedding the booking page in an Iframe of fixed size
  
 
|}
 
|}
  
 
== Customise Booking Widgets ==
 
== Customise Booking Widgets ==
Code snippets for booking widgets are available in SETTINGS->BOOKING PAGE->BOOKING WIDGETS.
+
Code snippets for booking widgets are available in {{#fas:cog}} (SETTINGSBOOKING ENGINE > BOOKING WIDGETS.
  
 
You can use HTML and CSS to create custom solutions.  
 
You can use HTML and CSS to create custom solutions.  
Line 402: Line 295:
 
The documentation is directly in the API.  
 
The documentation is directly in the API.  
  
To use the API you need to allow API ACCES. Go to SETTINGS -> ACCOUNT -> ACCOUNT ACCESS and allow API access. The API is available at https://api.beds24.com.The XML functions can be accessed with your Beds24 username and password. The JSON functions can be created with a API and prop key which you set yourself in the Beds24 control panel SETTINGS->ACCOUNT and SETTINGS->PROPERTIES->LINK
+
To use the API you need to allow API access. Go to This page is about the menu {{#fas:cog}} (SETTINGS) > ACCOUNT -> ACCOUNT ACCESS and allow API access. The API is available at https://api.beds24.com. The XML functions can be accessed with your Beds24 username and password. The JSON functions can be created with a API and prop key which you set yourself in the Beds24 control panel This page is about the menu {{#fas:cog}} (SETTINGS) > ACCOUNT and This page is about the menu {{#fas:cog}} (SETTINGS) > PROPERTIES > ACCESS
 +
 
 +
 
 +
==Skip to Checkout Page from Beds24 Plugin Widget==
 +
 
 +
Check the following instructions: https://gist.github.com/koryrichardson/55a460ce298ea1879c041e90d1e1e527
 +
 
 +
== Create a website with the content in your Beds24 account ==
 +
We have an integration with Rezintel which allows users/developers to create a website with the data you have in Beds24.
 +
 
 +
Go to [https://wiki.beds24.com/index.php/Rezintel_Website_Builder Website builder] for more details.

Revision as of 13:16, 2 May 2022

Developer Options
This page is about the menu  (SETTINGS) > BOOKING ENGINE  >  PROPERTY BOOKING PAGE > DEVELOPERS

The booking page can be embedded in a page using an Iframe or opened with a link or form. It can be fully customised in This page is about the menu (SETTINGS) > BOOKING ENGINE. This page gives an overview. Additional options for developers are:

1 Custom Text

Any fixed text on the booking page can be exchanged in This page is about the menu (SETTINGS) > BOOKING ENGINE > PROPERTY BOOKING PAGE > DEVELOPER > "Custom Text"

For more information please read the context help (?).

2 Custom CSS

Custom CSS can be added in This page is about the menu (SETTINGS) > BOOKING ENGINE > PROPERTY BOOKING PAGE > DEVELOPERS > "Custom CSS"

To see a list of CSS examples look into this document: Custom CSS

3 External CSS file

It is possible to make the booking page use a CSS file that you supply, you must host the CSS file on a secure web server (using https:).

To do this you need to add the &cssfile parameter to the URL for the booking page, or for example the Iframe SRC.

You could do this to use different styling per page or site.

For example if your css file is: https://yoursite/path/your.css

Go to this site and encode it: http://meyerweb.com/eric/tools/dencoder/

Add the resulting parameter to the booking page URL like this: &cssfile=https%3A%2F%2Fyoursite%2Fpath%2Fyour.css

Your CSS file will be included.

The external stylesheet needs to be hosted on a secure site (https) to be accepted by the secure Beds24 booking page.


Keywords: URL parameter, parameter, language, number of guests, web design, web designer, developer

4 Javascript

Javascript can be entered in This page is about the menu (SETTINGS)> BOOKING ENGINE > PROPERTY BOOKING PAGE > DEVELOPERS or in (SETTINGS) >BOOKING ENGINE > MULTI BOOKING PAGE> DEVELOPER "Advanced HTML Settings"

4.1 Redirects

For example: this would cause property 1234 to open in the parent window (frame busting) when it's book button is clicked on the multiple property page

<script> $(document).ready(function(){ $('#propid1234 a').attr('target', '_parent'); }); </script>

Check the settings under (SETTINGS) >BOOKING ENGINE > PROPERTY BOOKING PAGE > BEHAVIOUR before you add such a script.

4.2 Change the title text

Javascript to change the titletext.

<script>document.title='your title';</script>

4.3 Change date format to American

Javascript to change the date format.


<script> $(document).ready(function(){

$('#inputcheckin').data('date-format','MMMM DD, YYYY'); $('#inputcheckout').data('date-format','MMMM DD, YYYY'); }) </script>

<script> window.onload = function() { $("[id^='ptdate']").text(function(i, t) { return t.split(' ').reverse().join(' '); }) };

window.onunload = function(){}; </script>

5 Booking Page Parameters

The behavior of the booking page can be controlled with the following parameters passed in the URL or form. URL Parameters are always added in the format name=value. To separate them, the first parameter must have a ? before it and all following parameters must have an & before them. For example if you want to change the default for the numbers of night selector to 7 nights you change the link to your booking page from

https://beds24.com/booking2.php?propid=2047

to

https://beds24.com/booking2.php?propid=2047&numnight=7


Example: Make a booking page for selected rooms only

Use the propid to open the page and add &hideroom=22543 to hide a room. You can hide multiple rooms by comma separating them.

https://beds24.com/booking2.php?propid=2048&hideroom=3589,3588


Example: link to the booking page with dates pre populated:

https://beds24.com/booking2.php?propid=13437&checkin=2017-8-24&numnight=3

exchange these values with your data:

checkin=2017-8-24 - the date the guest wants to arrive

&numnight=3 - the number of nights the guest wants to book


Example: Link to a booking form with dates and room pre populated:

https://beds24.com/booking2.php?checkin=2017-8-24&numnight=3&numadult=2&numchild=0&br1-32919=Book&roomid=32919

exchange these values with your data:

checkin=2017-8-24 - the date the guest wants to arrive

&numnight=3 - the number of nights the guest wants to book

&numadult=2 - number of adults

&numchild=0 - number of children

&br1-32919=Book - exchange 32919 with the room id the guest wants to book

&roomid=32919 - exchange 32919 with the room id the guest wants to book

Example: Booking form for a preselected room and dates

Create a URL like this:

https://beds24.com/booking2.php?propid=13434&checkin_hide=2016-11-24&numnight=2&numadult=1&br1-32906=Book

You need to define:

1) propid

2) one of checkin or checkin_hide (different date formats)

3) one of checkout, checkout_hide or numnight

4) numadult and/or numchild

5) br1-32906=Book where "br1 is offer 1, br2 is offer 2 etc. and 32906 is the room to book.


Parameter Value Description
https://beds24.com/booking.php Path to booking page At the very minimum there must also be one of propid, roomid or ownerid parameter
advancedays number of days This will set the initial date to this many days in advance of today. Only applies the first time the page is opened. If advancedays is not used the initial date will be the current date. The first date with availability can be specified by setting advancedays to the value -1.
checkin check-in full date The page will open at this check-in date
cssfile encoded url External css file for inclusion in booking page, the file must be available via a secure url (https) and the url must be url encoded. (http://meyerweb.com/eric/tools/dencoder/)
cur AUD, CAD, EUR, GBP, NZD, USD, BGN, BRL, CHF, CNY, CZK, DKK, EEK, HKD, HRK, HUF, IDR, INR, JPY, KRW, MXN, MYR, NOK, PHP, PLN, RON, RUB, SEK, SGD, THB, TRY, VND, ZAR Opens the page showing the currency converted. (responsive booking page only)
fdate_date check-in date of month The page will open at this check-in date, must be used with either fdate_monthyear or fdate_month and fdate_year. Must be in format DD
fdate_monthyear check-in month and year The page will open at this check-in date, must be used with fdate_date and be in the format MM-YYYY
fdate_month check-in month The page will open at this check-in date, must be used with fdate_date and fdate_year and be in the format MM
fdate_year check-in year The page will open at this check-in date, must be used with fdate_date and fdate_month and be in the format YYYY


group keyword Show only properties that have this group keyword
hidefooter yes, no Do not show the property information at the bottom of the page
hideheader yes, no Do not show the property information at the top of the page. Do not use this option when using a "Full Width Slider".


hideoffer 1,2,3,4 Do not show this offer on the booking page, multiple id's can be specified with a comma separating them.
hideprop property id Do not show this property on the booking page, multiple id's can be specified with a comma separating them.
hideroom room id Do not show this room on the booking page, multiple id's can be specified with a comma separating them.
invoicee integer Charges and payments will be assigned to this invoicee ID.
lang en (English), ar (Arabic), bg (Bulgarian), ca (Catalan), hr (Croatian), cs (Czech), da (Danish), de (German), el (Greek), es (Spanish), et (Estonian), fi (Finnish), fr (French), he (Hebrew), hu (Hungarian), id (Indonesian - Bahasa Indonesia), is (Icelandic), it (Italian), ja (Japanese), ko (Korean), lt (Lithuanian), lv (Latvian) mn (Mongolian), my (Burmese), nl (Dutch), no (Norwegian), pl (Polish), pt (Portuguese), ro (Romanian), ru (Russian), sk (Slovak), sl (Slovenian), sr (Serbian), sv (Swedish), th (Thai), tr (Turkish), vi (Vietnamese), zh (Chinese simplified), zt (Chinese traditional) Sets the default language to open the booking page. (2013 new style booking pages only)
layout 1, 2, 3, 4, 5, 6, Opens the responsive version of the booking page in this layout.


maxprop number of properties Show a maximum of this many properties based on the sort order. Additional properties are hidden.


maxroom number of rooms Only show a maximum of this many rooms based on the sort order. Additional rooms are hidden.
mobile=1 mobile view Display the booking page in mobile view
mobile=0 desktop view Display the booking page in desktop view
multiroom 0, 1 Opens the page with multi-room booking selected or unselected. (2013 new style booking page only)
numnight number of nights Initial value for the number of nights selector
numadult number of adults Initial value for the number of adults selector
numchild number of children Initial value for the number of children selector


numdisplayed number of nights with prices displayed Only applies to price table pages, use this to reduce the number of nights for narrow designs
nogroup keyword Exclude properties that have this group keyword


ownerid id number of owner. The page will open showing all properties and rooms for this owner
propid id number of property. The page will open showing this property.
redirect encoded url Redirect to this url, must start with http:// or https:// and be url encoded with a tool like http://meyerweb.com/eric/tools/dencoder/. The booking details are stored in session variables and will be available available to a booking page in an Iframe at your redirect URL as long as the Iframe is not overriding them in it's src url.
referer text This text will be recorded with any bookings originating from this widget allowing tracking of booking sources
roomid id number of room. The page will open showing this room.
toproom room always shown on the top of the bookingpage you can add mulitpel room IDs separated by a comma (resposive booking page only)
width page width in px Useful for embedding the booking page in an Iframe of fixed size

6 Customise Booking Widgets

Code snippets for booking widgets are available in (SETTINGS) BOOKING ENGINE > BOOKING WIDGETS.

You can use HTML and CSS to create custom solutions.

Make Your Own Booking Widget


Wordpress

If you use the Beds24 Wordpress plugin booking widgets and booking page can be added via a short code. Options and help regarding customisation can be found directly in the plugin settings.


Old booking page only:

|- | hidename || yes, no || Do not show the property name heading

|- | hidedesc || yes, no || Do not show the description

7 Custom Applications / API

We also have an API which allows developers to develop their own applications and solutions.

The API functions are available at https://api.beds24.com

The documentation is directly in the API.

To use the API you need to allow API access. Go to This page is about the menu (SETTINGS) > ACCOUNT -> ACCOUNT ACCESS and allow API access. The API is available at https://api.beds24.com. The XML functions can be accessed with your Beds24 username and password. The JSON functions can be created with a API and prop key which you set yourself in the Beds24 control panel This page is about the menu (SETTINGS) > ACCOUNT and This page is about the menu (SETTINGS) > PROPERTIES > ACCESS


8 Skip to Checkout Page from Beds24 Plugin Widget

Check the following instructions: https://gist.github.com/koryrichardson/55a460ce298ea1879c041e90d1e1e527

9 Create a website with the content in your Beds24 account

We have an integration with Rezintel which allows users/developers to create a website with the data you have in Beds24.

Go to Website builder for more details.

Subcategories

This category has only the following subcategory.

A