Changes

Jump to navigation Jump to search

Category:Developers

2,080 bytes added, 08:01, 8 May 2023
no edit summary
[[Category:Widgets]]
[[Category:Booking Page]]
[[Category:Booking_Engine]]
<div class="heading">Developer Options</div>
This page is about the menu {{#fas:cog}} (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 {{#fas:cog}} (SETTINGS) > BOOKING ENGINE. This [[Customise_Booking_Page|page]] gives an overview. Additional options for developers are:
== 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 ==
<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"
To see a list of CSS examples look into this document: [[Custom_CSS|Custom CSS]]
https://yoursite/path/your.css
Goto Go to this site and encode it:
http://meyerweb.com/eric/tools/dencoder/
== Javascript ==
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 > MULTIPLE PROPERTIES MULTI BOOKING PAGE> DEVELOPER "Advanced HTML Settings"
=== Frame busting 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
<code><script> $(document).ready(function(){ $('#propid1234 a').attr('target', '_parent'); }); </script></code>
<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 Javascript to change the titletext.
<code> <script>document.title='your title';</script></code>
== Booking Page Parameters =Change date format ===Javascript to change the date format.  <code><script>$(document).ready(function(){  $('#inputcheckin').data('date-format','MMMM DD, YYYY');$('#inputcheckout').data('date-format','MMMM DD, YYYY');})</script></code>
*The behavior of the booking page can be controlled with the following parameters passed in the URL or form<code><script>window. URL Parameters are always added in the format nameonload =valuefunction() {$("[id^='ptdate']"). To separate themtext(function(i, the first parameter must have a ? before it and all following parameters must have an & before themt) {return t.split(' ').reverse(). 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 join(' ');})};
https:window.onunload = function(){};</script></www.beds24.com/booking2.php?propid=2047code>
=== Change the first day of the week in the datepicker===The start day of the week in the checkin and checkout selectors is set automatically based on the language selected by the guest, different languages have different standards for this.It is possible tooverride it on a per language basis.
https://wwwThis example changes English to start on Monday, The value of dow can be from 0 to 6 where 0 is Sunday.beds24If you want to change multiple languages you would need to include a script for each language.com/booking2.php?propid=2047&numnight=7
<code><script>
moment.updateLocale("en", { week: {
dow: 1
}});
</script></code>
'''Example: hide header'''== 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://www.beds24.com/booking2.php?propid=2047
to
https://www.beds24.com/booking2.php?propid=2047&hideheadernumnight=yes7 
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://www.beds24.com/booking2.php?propid=2048&hideroom=3589,3588
'''Example: link to the booking page with dates pre populated:'''
https://www.beds24.com/booking2.php?propid=13437&checkin=2017-8-24&numnight=3
exchange these values with your data:
'''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
exchange these values with your data:
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
You need to define:
| '''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
|-
| roomid advancedays || id number of room. days || The 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 open showing this roombe the current date. The first date with availability can be specified by setting advancedays to the value -1.
|-
| propid checkin || id number of property. check-in full date || The page will open showing at this property. check-in date
|-
| ownerid cssfile || id number of owner. encoded url || The External css file for inclusion in booking page will open showing all properties , the file must be available via a secure url (https) and rooms for this ownerthe url must be url encoded. (http://meyerweb.com/eric/tools/dencoder/)
|-
| checkin cur || check-in full date 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|| The Opens the page will open at this check-in date  |-| mobile=0 || desktop view || Display showing the currency converted. (responsive booking page in desktop viewonly)
|-
|-
| 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 group || mobile view keyword || Display the booking page in mobile viewShow only properties that have this group keyword
|-
| numnight hidefooter || number of nights yes, no || Initial value for Do not show the number property information at the bottom of nights selector the page
|-
| numadult hideheader || number of adults yes, no || Initial value for Do not show the number property information at the top of adults selector the page. Do not use this option when using a "Full Width Slider".
|-
| numchild || number of children || Initial value for the number of children selector
|-
| width hideoffer || page width in px 1,2,3,4 || Useful for embedding Do not show this offer on the booking page in an Iframe of fixed size , multiple id's can be specified with a comma separating them.
|-
| numdisplayed hideprop || number of nights with prices displayed property id || Only applies to price table pages, use Do not show this to reduce property on the number of nights for narrow designsbooking page, multiple id's can be specified with a comma separating them.
|-
| referer hideroom || text room id ||This text will Do not show this room on the booking page, multiple id's can be recorded specified with any bookings originating from this widget allowing tracking of booking sourcesa comma separating them.
|-
|-
| advancedays lang || number of days 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), hy (Armenian), 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) || This will set Sets the initial date default language to this many days in advance of today. Only applies the first time open the booking 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.(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.
|-
| hideheader mobile=1 ||yes, no mobile view || Do not show the property information at the top of Display the booking pagein mobile view
|-
| hidefooter mobile=0 ||yes, no desktop view || Do not show the property information at the bottom of Display the booking pagein desktop view
|-
|-
| lang numnight ||en (English), ar (Arabic), number of nights 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), 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), zh (Chinese simplified), zt (Chinese traditional) || Sets the default language to open Initial value for the booking page. (2013 new style booking pages only)number of nights selector
|-
| hideprop numadult ||property id number of adults || Do not show 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 property on to reduce the booking page, multiple id's can be specified with a comma separating them.number of nights for narrow designs
|-
| maxprop nogroup ||number of properties keyword || Show a maximum of Exclude properties that have this many properties based on the sort order. Additional properties are hidden.group keyword 
|-
| hideroom ownerid ||room id number of owner. || Do not show The page will open showing all properties and rooms for this room on the booking page, multiple id's can be specified with a comma separating them.owner
|-
| maxroom propid ||id number of rooms property. || Only show a maximum of The page will open showing this many rooms based on the sort order. Additional rooms are hiddenproperty.
|-
| hideoffer redirect ||1,2,3,4 encoded url || Do not show Redirect to this offer on the booking pageurl, multiple id's can must start with http:// or https:// and be specified url encoded with a comma separating 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 themin it's src url.
|-
| group referer || keyword text || Show only properties that have This text will be recorded with any bookings originating from this group keyword widget allowing tracking of booking sources
|-
| nogroup roomid || keyword id number of room. || Exclude properties that have The page will open showing this group keywordroom.
|-
| cssfile toproom ||encoded url room always shown on the top of the bookingpage || External css file for inclusion in you can add mulitpel room IDs separated by a comma (resposive 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/only)
|-
| cur voucher ||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, ZARvoucher code || Opens the page showing Pre populates the currency converted. (responsive booking page only)discount voucher code
|-
| redirect width ||encoded url page width in px || 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 Useful for embedding the booking page in an Iframe at your redirect URL as long as the Iframe is not overriding them in it's src url.of fixed size
|}
== Customise Booking Widgets ==
Code snippets for booking widgets are available in {{#fas:cog}} (SETTINGS->) BOOKING ENGINE->BOOKING WIDGETS.
You can use HTML and CSS to create custom solutions.
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==
You can bypass the booking page and redirect the widget directly to the checkout page by adding this parameter
 
<code>customParameter:'br1-xxxx=book'</code>
 
to the widget.
 
Replace xxxx with the room ID of the room you want to populate.
 
== 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.
 
== Suppress Google Translate==
Add the following in the "Head" section:
 
<code><meta name=“google” content=“notranslate”>
<html translate=“no”></code>

Navigation menu