liveRES Booking insert instructions

This page documents the LiveRES reservation insert for restaurant bookings. It lists the parameters that can be defined and gives an example insert at the bottom.

The LiveRES reservation insert is a javascript insert that can be placed anywhere on your web page. The insert has two parts, the first is for the setup of some variables that depict how the reservation insert operates and looks. The second is the actual script insert itself which is an external javascript file hosted by LiveRES. This insert then dynamically generates an html iframe at that position in the web page using the parameters provided. Additionally two of the parameters, _fez_rest and _fez_offer, can be set inside the url of the web page as the url parameters lrm_rest and lrm_offer.

The parameters that can be set within the page are :-

_fez_account

Mandatory. The unique account reference for the LiveRES customer. This is obtained from your account representative.

_fez_partner

Optional. The partner reference code. This is obtained from your account representative.

_fez_brand

Mandatory. The brand required for the insert. An account can have multiple brands and within each brand multiple restaurants. This determines the brand for the insert and hence the list of restaurants available. The brand code is as entered in the LiveRES admin system.

_fez_rest

Optional. The restaurant required for the insert. Used to limit the list of restaurants. The restaurant code is as entered in the LiveRES admin system. This variable can also be set from the url parameter lrm_rest in the hostpage, e.g. If the page that contains the LiveRES insert is at http://www.site.com/bookings.html?lrm_rest=ABC then the restaurant code will be set to ABC.

_fez_width

Mandatory. The actual width in pixels of the reservation insert iframe.

_fez_height

Mandatory. The actual height in pixels of the reservation insert iframe.

_fez_scrolling

Optional. The scrollable nature of the reservation insert iframe. "yes" means it will enable scroll bars if the reservation insert produced is longer or wider than the iframe. "no" means it will not. The default is no.

_fez_anal

Optional. Analysis code to be used in logging. This enables analysis of different reservation inserts to be done. This will be overridden by the analysis code of the special offer.

_fez_stylesheet

Optional. A full url to a css file to be used to style the reservation insert. The stylesheet controls the look (colour, font, size etc) and placement of the text and inputs on the reservation insert.

_fez_mobile

Optional. Flag to say if this is on a mobile site or not. NB Not Yet Implemented!

_fez_ascript

Optional. Flag to say if advanced scripting is on or not. NB Not Yet Implemented!

_fez_head

Optional. The text to display in the header of the reservation insert.

_fez_desc

Optional. The description to display under the header. NB Not Yet Implemented!

_fez_offer

Optional. The special offer code to use for the reservation insert. The code is as entered in the LiveRES admin system. This variable can also be set from the url parameter lrm_offer in the hostpage, e.g. If the page that contains the LiveRES insert is at http://www.site.com/bookings.html?someparam&lrm_offer=999 then the offer code will be set to 999. If this offer is not available either because of dates or it does not exist then an appropriate error message is produced in the reservation insert iframe.

_fez_offerpopup

Optional. Flag to say if the offer text appears in a popup overlay with the ability to open and close it. Ideally used on frames with limited space. 1 = on

_fez_daymarketingpopup

Optional. Flag to say if the marketing message for a day appears in a popup overlay with the ability to close it. If this is not set then the marketing title will just appear as a tooltip for the date in the calendar. 1 = on

_fez_restaurantpicker

Optional. Flag to turn on the restaurant picker. If this is set and the _fez_rest variable is empty then the restaurant picker function is enabled. 1 = on NB this needs to be styled in the css.

_fez_offerpicker

Optional. Flag to turn on the offer picker. If this is set then the offer picker function is enabled. 1 = on

_fez_choosefullprice

Optional. Flag to turn on the 'choose full price offer' option in the time dropdown. If set and the booking insert is for an offer then this is enabled. The text displayed is as set up in the chooseFullPriceOfferText option in the admin system, if this is not set the text "Book Full Price" is used. 1 = on

_fez_offerpopupchoosefullprice

Optional. Flag to turn on the 'offer popup choose full price' in the offer popup. If set and the booking insert is for an offer and offerpopup is set then this is enabled. The text displayed is as set up in the offerPopupFullPriceText option in the admin system, if this is not set the text "If we don’t have the date and time on this offer that you require click here to switch to full price availability" is used. 1 = on

_fez_source

Optional. The booking source to send to the table management system. If not defined this is defaulted from the LiveRES admin system. This will be overridden by the booking source of the special offer.

_fez_buttitle

Optional. Used for the title of the button when using the bookit button script (bookit.js) If not set " Bookit " is used.

_fez_nocookie

Optional. LiveRES uses a cookie to store the last visit, together with any booking details like name, email etc. These are then used to prepopulate the details the next time the user visits. If this is set to 1, a cookie is not written to and not read from. If the cookie already exists it will not be deleted.

_fez_requests

Optional. Use this to pre populate the requests field with data - e.g. from your membership system if a user has logged in.

_fez_requestsmandatory

Optional. Flag to make the requests field mandatory. 1 = mandatory

_fez_requestsname

Optional. The text to appear next to the requests prompt, and for the error message if requests are blank and _fez_requestsmandatory is set to 1. NB if a css uses an image to show the requests text, as is standard on the LiveRES MPU units, then this is not changed.

_fez_title

Optional. Use this to pre populate the title dropdown with data - e.g. from your membership system if a user has logged in. Valid entries are Mr, Mrs, Miss, Ms

_fez_forename

Optional. Use this to pre populate the forename field with data - e.g. from your membership system if a user has logged in.

_fez_surname

Optional. Use this to pre populate the surname field with data - e.g. from your membership system if a user has logged in.

_fez_tel

Optional. Use this to pre populate the telephone field with data - e.g. from your membership system if a user has logged in.

_fez_email

Optional. Use this to pre populate the email field with data - e.g. from your membership system if a user has logged in.

_fez_terms

Optional. Use this to pre tick the Terms and Conditions tick box. 1 = ticked, 0 = unticked

_fez_callbackurl

Optional. Use this if you require a callback once a booking is completed. This url will be inserted into the booking confirmation page as a 0x0 size iframe. Additionally for tracking purposes liveRES can populate a number of fields in this, namely {restid} = restaurant ID, {bookdate} = booking (seated) date, {covers} = number of covers, {restname} = restaurant name, {seshname} = session name, {title},{surname},{email}, and {tel} for the person details. E.g. _fez_callbackurl = "http://www.yoursite.com/tracker.php?r={restid}&dte={bookdate}&p={covers}"; this will populate the url with restid, bookdate and covers at time of booking. This can also be used if you wish to redirect the user to another page once a booking is made, an example useage of this is at http://test.liveres.co.uk/cbexample.html, this sets a callback url of http://test.liveres.co.uk/cbredirect.html and this in turn does a redirect of the whole page to the thank you page.

_fez_scriptinsert

Optional. Use this if you require additional scripts loading into the booking unit. This is a javascript array, with an entry per script you want loading. An example use of this is to hook into the time selected event by including a script that includes a function "function liveREStimeSelectEvent(rest,dte,people) {}". You can also hook into each ajax postback using the pageLoad(){} function, this is executed after each ajax event and can then be used to manipulate the DOM, do tracking etc.

_fez_inlineenquiries

Optional. Use this to show the enquiry prompts inline on the page rather than as a popup. NB this needs the enquiries functionality switched on, and an appropriate stylesheet. 1 = on.

_fez_inlineenqcoverstext

Optional. Use this to set a description to appear below the enquiries covers header. This text appears in a span with id = coversEnqText and class inlineText. The default is empty.

_fez_inlineenqtimestext

Optional. Use this to set a description to appear below the enquiries times header. This text appears in a span with id = timesEnqText and class inlineText. The default is empty.

_fez_popenqcoverstext

Optional. Use this to set a description to appear below the enquiries covers header when using the enquiries popup form. This text appears in a span with id = lblEnqCvrsMsg and class enquiryMsg. The default is "If you wish to book for more people than we are offering please enter the numbers below. Your booking will be treated as an enquiry and not a confirmed booking."

_fez_popenqtimestext

Optional. Use this to set a description to appear below the enquiries times header when using the enquiries popup form. This text appears in a span with id = lblEnqTimeMsg and class enquiryMsg. The default is "You have chosen to pick a time other than one we are offering, please note that this will make your booking an enquiry only."

_fez_findnext

Optional. Use this to turn on the Find next functionality. A value of 1 turns it on as a button before the calendar. 2 = turn it on as an option in the times dropdown. 3 = turn it on for both. NB options 1 and 3 are not suitable for units with menus switched on.

_fez_notimespopup

Optional. Use this to turn on a popup message when no times are found. If this is set to 1 then when the times dropdown is populated (once restaurant,session,covers,date,menu are chosen) if there are no times available it will also produce a popup with the same message as shown in the times dropdown. NB this will use the same html popup as used for daily marketing, and it will requiring a stylesheet that can handle such a popup.

_fez_showPrefix

Optional. Use this to turn on the phone number prefix dropdown for international phone prefixes. The default selection will be the phone prefix of the restaurant chosen.

_fez_facebook_shareon

Optional. Turn on the facebook share button on the booking confirmation page. A value of 1 will turn this on and present a button on the booking confirmation page that allows the user to share a message to facebook. The message is of the form "I have just booked a table at {restaurant name}, {restaurant address} On {date} {time}."

example fb post
Example of a facebook post generated by this functionality.

_fez_facebook_shareimage

Optional. Set the image to use on the facebook share.

_fez_facebook_shareclick

Optional. Set the URL for the facebook share, if this is not set, or set to "" then it uses the url of the page the booking unit is on.

_fez_facebook_sharecaption

Optional. Set the caption for the message. If this is not set then the restaurant address is used. If it is set to "" then it uses the url of the page. If you want this to be blank set it to a space.

_fez_facebook_sharedesc

Optional. Set the description for the message. If this is not set then the restaurant name is used. If you want this to be blank, set this to ""



NB the actual url for the javascript insert is not as specified in this page as this is the example site. Your support representative will issue the live url at time of implementation !

Example insert that uses one of our standard stylesheets

The script parameters are:-

Then the following insert:-

To get the exact syntax please view the page source. Also please visit the site http://test.liveres.co.uk for other examples

Bookit Button - insert the above script that sets all the variables, but instead of the fez.js insert use the following insert :-

SSL encryption

liveRES recommend that SSL be used. The liveres service has an SSL certificate on the liveres.co.uk domain. SSL is switched on if you use https for the fez.js or bookit.js script above e.g.

NB If you use https then any stylesheet, and images used within the stylesheet should also be served from https.

Mobile web browser detection script.

We recommend you use server code to detect a mobile browser and to then redirect to the mobile web site. Example asp.net c# code , asp.net vb.net code and php code are provided. You will need to set up to three variables inside the code. Inline comments provide instruction for this.

Alternatively if you are not able to change the backend code of the site you can add a few lines of javascript to the head section of your pages.

            
    <script type="text/javascript">
        _liveres_mobilesitename = "{brand name}";
        _liveres_restcode = "{restaurant code or blank}";
        _liveres_offercode = "{offer code or blank}";
    </script>
    <script type="text/javascript" src="http://bookings.liveres.co.uk/scripts/mobiledetect.js"></script>
            
            

Place the above javascript into the head section of your page replacing {brand name} with your appropriate brands mobile site name. If you wish to redirect to a specific restaurant page then also replace {restaurant code} with the restaurant code, otherwise leave this blank. If you wish to redirect to a specific offer then replace both {restaurant code} and {offer code} with the relevant codes, otherwise leave the offer code blank.

If the user has clicked on the "full Site" link on the mobile web site, each of the above will place a cookie which then stops the redirection to the mobile site for 30 minutes. This enables linking back to the main site from the mobile site without it trying to redirect again.

Offer Advertisement insertion script

The LiveRES offer advertisement insert is a javascript insert that can be used by an ad network and placed anywhere on a web page. The insert has two parts, the first is for the setup of some variables that depict how the reservation insert operates and looks. The second is the actual script insert itself which is an external javascript file hosted by LiveRES. This insert then dynamically generates an html iframe at that position in the web page using the parameters provided.

The parameters that can be set within the page are :-

_liveres_account

Mandatory. The unique account reference for the LiveRES customer. This is obtained from your account representative.

_liveres_brand

Mandatory. The brand required for the insert. An account can have multiple brands and within each brand multiple restaurants. This determines the brand for the insert and hence the list of offers available. The brand code is as entered in the LiveRES admin system.

_liveres_linkurl

Mandatory. The URL to link to when an offer is clicked. This url will be appended with the offer code chosen - e.g. "www.restaurantsite.com/offerspage?offercode="

_liveres_width

Optional. The actual width in pixels of the offer advertisement insert iframe. The default is the leaderboard width of 728.

_liveres_height

Optional. The actual height in pixels of the offer advertisement insert iframe. The default is the leaderboard height of 90.

_liveres_scrolling

Optional. The scrollable nature of the offer advertisement insert iframe. "yes" means it will enable scroll bars if the insert produced is longer or wider than the iframe. "no" means it will not. The default is no.

_liveres_stylesheet

Optional. A full url to a css file to be used to style the offer advertisement insert. The stylesheet works in conjunction with the script and controls the look (colour, font, size etc) and placement of the text and images on the insert. The default is the leaderboard1.css

_liveres_script

Optional. A full url to a script file to be used on the offer advertisement insert. The script adds capabilities such as scrolling and animation to the insert. The default is the leaderboard1.js which provides a horizontal carousel and animation of the offer description.

_liveres_image

Optional. A full url to an image file to be used on the offer advertisement insert header.

_liveres_headtext

Optional. Text to be used on the offer advertisement insert header.

NB the actual url for the javascript insert is not as specified in this page as this is the example site. Your support representative will issue the live url at time of implementation !

Example insert that uses our standard leaderboard carousel style and script

The script parameters are:-

Then the following insert:-

   

To get the exact syntax please view the page source.

Deprecated

As of version 4.9.0 the following parameters have been deprecated, and will no longer be supported.

_fez_marketingtext

Optional. Use this change the wording of the marketing tick box label - The default for this text is "I would like to receive offers via email."

_fez_marketing

Optional. Use this to pre tick the marketing tick box - e.g. from your membership system if a user has logged in. 1 = ticked, 0 = unticked

_fez_partnermarketing

Optional. Use this to pre tick the partner marketing tick box (if there is one) - e.g. from your membership system if a user has logged in. 1 = ticked, 0 = unticked