Skip to main content
RBE redirection to a Wix website

How to integrate RBE into your Wix website

Nataša Lakić avatar
Written by Nataša Lakić
Updated over a month ago

This help article is focused on setting up redirection from website created using Wix.com to Rentlio Booking Engine. We will focus on redirection flow, for design and layout please consult appropriate Wix.com documentation.

For documentation purposes, examples are show on Modern Hotel template on Wix.com. Instructions are in the video.

Code that you have to copy when video instructs you:

import wixLocation from 'wix-location';
function getDateString (date) {
return date.getDate().toString() + '-' + (date.getMonth() + 1).toString() + '-' + date.getFullYear().toString();
}
export function redirectToRentlio(event) {
// Instead of <slug> enter your slug from Booking engine settings
const rbeUrl = 'https://<slug>.book.rentl.io'
// Change #from to match wix.com value
var from = $w('#from').value;
// Change #to to match wix.com value
var to = $w('#to').value;
// Change #adults to match wix.com value
var adults = $w('#adults').value;
var fromString = getDateString(from)
var toString = getDateString(to)
let fullUrl = rbeUrl + '?from=' + fromString + '&to=' + toString + '&adults=' + adults
wixLocation.to(fullUrl)
}
Did this answer your question?