Documentation | Global Search Widget version: 1.2

Preview


This widget will redirect the user to your rentware shop with certain parameters. It has many different options. Select an option and preview the widget

Functionality
Filter
Style

Global Search Widget


This widget will redirect the user to your rentware shop with certain parameters:

  • time and date range (optinal)
  • locations (optinal)
  • current languages English (en-gb, en-us...), German (de, de-ch), French (fr), Norwegian (nb), Dutch (nl)
    make sure you include the one you use in the shop
    if you need a different language we can simply include it
  • filter OR tab (optinal)
    usefull for the home page on your website
  • preselected filter (optinal)
    usefull for a category page on your website
  • sidebar style (optional)
    usefull to display the widget as a sidebar on your website
  • different shop URLs (in case you have more than one shop URL, optional)

Installation


<div id="rentware-widget--global-search" style="min-height: 100px;"></div>
<script>
    var loadRentwareWidgetScriptAsync = function(uri){
        return new Promise((resolve, reject) => {
        var tag = document.createElement('script');
        tag.src = uri;
        tag.async = true;
        tag.onload = () => {
            resolve();
        };
        var firstScriptTag = document.getElementsByTagName('script')[0];
        firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
    });
    }
    var rentwareWidgetScriptLoaded = loadRentwareWidgetScriptAsync('https://rentware-cwidgets-cdn.b-cdn.net/collections/globalSearchWidgetDynamic.js');
</script>
<script>
    rentwareWidgetScriptLoaded.then(function(){
        GlobalSearchWidget.init({
            elementId: "rentware-widget--global-search",
            lang: "en-gb", //en-gb, en-us, de, de-ch, fr, nb, nl
            shopUrl: "https://sprinter-rentals.rentware.io",
            withTimeRange: true,
            withDateRange: true,
            withStations: true,
            withDefaultDate: false, // depricated
            styleSidebar: false,
            showStationsDetails: true,
            animateCategoryTabImage: true,
            date: {
                dateOffset: "1",
                minDaysDuration: "1",
            },
            defaults: {
                start: "10:00",
                end: "16:00",
                hoursFormat: "24",
                submitEnabled: "Look Up",
                submitDisabled: "Select Location first",
                inputLabelStations: "Location",
                inputLabelPickup: "Start",
                inputLabelDropoff: "End",
                dropDownStationsHeadline: "Stations",
                dropDownStationsNoResults: "No results",
                inputPlaceholderStations: "Please select",
                inputPlaceholderPickup: "Select pickup date",
                inputPlaceholderDropoff: "Select dropoff date",
            },
            hourOptions: [
                "11:00",
                "12:00",
                "13:00",
                "14:00",
                "15:00",
                "16:00",
                "17:00",
            ],
            stations: [
                {
                    label: "CA - San Diego",
                    phoneLabel: "Phone",
                    phone: "038461 11111",
                    openDailyLabel: "daily",
                    openDaily: "08:00 - 15:00",
                    openSaturdayLabel: "Saturday",
                    openSaturday: "08:00 - 15:00",
                    openSundayLabel: "Sunday",
                    openSunday: "08:00 - 15:00",
                    returnLabel: "Return",
                    return: "24/7",
                    shopUrl: "https://sprinter-rentals.rentware.io",
                    locationParam: "CA - San Diego",
                },
                {
                    label: "CA - Orange County",
                    phoneLabel: "Tel",
                    phone: "038461 22222",
                    openDailyLabel: "daily",
                    openDaily: "08:00 - 16:00",
                    openSaturdayLabel: "Saturday",
                    openSaturday: "08:30 - 15:00",
                    openSundayLabel: "Sunday",
                    openSunday: "08:00 - 15:00",
                    returnLabel: "Return",
                    return: "24/7",
                    shopUrl: "https://sprinter-rentals.rentware.io",
                    locationParam: "CA - Orange County",
                },
            ],
            categories: [
                {
                    label: "All",
                    shortDescription: "All Sprinter",
                    category: "All",
                },
                {
                    label: "12",
                    shortDescription: "12 Seater",
                    category: "12 Seater",
                    imageUrl:
                        "https://www.sprinter-rentals.com/img/12-seater-sprinter-van.jpg",
                },
                {
                    label: "15",
                    shortDescription: "15 Seater",
                    category: "15 Seater",
                    imageUrl: "https://www.sprinter-rentals.com/img/15-seater-sprinter-van.jpg"
                },
                {
                    label: "Cargo",
                    shortDescription: "Need space?",
                    category: "Cargo",
                    imageUrl: "https://www.sprinter-rentals.com/img/cargo-van.jpg"
                },
                {
                    label: "Crew Cargo",
                    shortDescription: "Total seating of 6",
                    category: "Crew Cargo",
                    imageUrl: "https://www.sprinter-rentals.com/img/crew-cargo-sprinter-van.jpg"
                },
                {
                    label: "Sprinter",
                    shortDescription: "",
                    category: "Sprinter",
                    imageUrl: "https://www.sprinter-rentals.com/img/comfort-class-sprinter-van.jpg"
                },
                {
                    label: "Transit",
                    shortDescription: "",
                    category: "Transit",
                    imageUrl: "https://www.sprinter-rentals.com/img/executive-class-sprinter-van.jpg"
                },
            ],
        });
    });
</script>