How to Implement The Availability Tool in a Web Site

Index


Overview

This availability tool provides a Respax client the functionality to display live availability in a website for any of their web enabled tours. It does not follow on to either a Respax Netwizard booking process or a branded Tourdesk shopping cart. To implement live bookings in a website, please contact Respax at support@respax.com.au or by phone +61 (0)7 4041 1017.

Return to Index


Implementation

The following code must be included in the current header of the web page:

function launchAvail(host_id, product_id, currentDate) {
if (!currentDate) {
       var currentDate = new Date ();
   } else {
       var currentDate = new Date (currentDate);
   } 
     var fromdate = currentDate.getFullYear() + "-" + (currentDate.getMonth()+1) + "-" + currentDate.getDate();

   window.open('http://tourdesk.respax.com.au/section/public/dispatch.php?file=product_availability&anonuser=anonymous&host_id='+host_id+"&product_id="+ product_id+"&fromdate="+fromdate, '_blank', 'width=800,height=400,toolbar=0,resizable=0,scrollbars=1,status=0');

}

The window can be customised by modifying the following parameters above:

width=x - where x is the width of the window in pixels

height=y - where y is the hight of the window in pixels

toolbar=0 - 0 disables the toolbar in the browser window, 1 enables

resizable=0 - 0 disable the user to resize the window, 1 enables

scrollbars=1 - 1 enable the scroll bars, 0 disables them

status=0 - 0 disables the status line at the bottom of the window, 1 enables

The following link in html will open a new window with the availability for a company with ID = <org_id> and a product tour code = <product_id>.

<a href="#" onClick="launchAvail('<org_id>', '<product_id>');">Show Availability</a>

As an example, Deep Sea Divers Den = DSDD and OceanQuest 4 day = OQ4N. The code would be: <a href="#" onClick="launchAvail('DSDD', 'OQ4N');">Show Availability</a>

would result in the following window being opened:

As can be seen, subsequent tours and/or dates can be selected on this screen.

Return to Index


nw howtos availabilitytools (last edited 2008-12-09 06:23:33 by tertius)