Website - Availability Checking tool

This feature will likely require help from a software developer.

Note: This features requires you to be using the new quote pages. Please see notes in this update on how to switch over to them.

  1. Go to Settings->Online Quoting and turn on ‘Allow customers to view rental availability (Quote Request)’
  2. Make sure you have the new quote pages activated
  3. Use the following sample code for each of your product pages. You’ll need to adjust the parameters

Example link:

http://www.inflatableoffice.com/quotes/check_availability.php?name=Demo+Rentals+LLC&startdate=01/13/2014&starttime=08:00&duration=12.5&usecushion=0&showlocations=0&rental_names=Popcorn+Machine|Slide|Cotton+Candy

Sample implementation:

<!doctype html>

<html lang="en">

<head>

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">

<script src="//code.jquery.com/jquery-1.10.2.js">"color: rgb(0, 0, 0);"> <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js">"color: rgb(0, 0, 0);"> "color: rgb(0, 0, 0);"> function checkAvail(item){

startdate = $('[name="'+item+'"]').val();

url = "http://www.inflatableoffice.com/quotes/check_availability.php?callback=?"

+ "&name=Demo+Rentals+LLC"

+ "&startdate="+startdate

+ "&starttime=08:00"

+ "&duration=16"

+ "&usecushion=1"

+ "&showlocations=0"

+ "&rental_names="+item;

$.getJSON( url, function( data ) {

var items = [];

$.each( data, function( rental_name, qty ) {

//items.push( rental_name + ": " + qty + " Available" );

items.push( qty + " Available" );

});

output = items.join( "" );

$('#avail').html(output);

});

}

function checkAvailLocations(item){

startdate = $('[name="'+item+'"]').val();

url = "http://www.inflatableoffice.com/quotes/check_availability.php?callback=?"

+ "?name=Demo+Rentals+LLC"

+ "&startdate="+startdate

+ "&starttime=08:00"

+ "&duration=16"

+ "&usecushion=1"

+ "&showlocations=1"

+ "&rental_names="+item;

$.getJSON( url, function( data ) {

var items = [];

$.each( data, function( loc, rentals ) {

$.each( rentals, function( rental_name, qty ) {

items.push( loc + ": " + qty + " Available" );

});

});

output = items.join( "<br>" );

$('#avail').html(output);

});

}

"color: rgb(0, 0, 0);"></head>

<body>

<div id="avail"></div>

<p>Date: <input type="text" name="Popcorn Machine"></p>

<input type="button" "checkAvail('Popcorn Machine')" value="Check Availability" />

</body>

"color: rgb(0, 0, 0);"> $(function() {

$( ".datepicker" ).datepicker();

});

"color: rgb(0, 0, 0);"></html>

Is article helpful?