Wix Installation

Wix Installation

hotelrsv.min.js Library

To implement the hotelrsv.min.js library in Wix, follow these steps:
In the Dashboard → Settings → Custom Code → Head option (official Wix guide), place the installation code in the Head, but you must separate the essential code from the Analytics code by placing them in the correct loading order:


Below is an example of how to load each code:



We place in the Head:

The code type is Essential:



While the analytics code must be of type Analytics:



Launching of the Reservations App


by Buttons (Classic)

Notes
This guide is experimental and may not work. Contact Wix Support if you have any questions.
One option is to evaluate Javascript's universal className function (see reference), and use Wix's $w element (see reference) to assign the class, the code would look something like this:
  1. $w(#booking).className = 'rsv-launcher'; 
It is recommended that you try to implement this functionality following the Wix specifications.

by New Tab with URL (Alternative)

You can launch a new tab using the URL parameters (see guide for adding parameters to the URL), by simply adding the parameter f_name=hrsv_launcher to the URL of the page and the engine will open.
It is recommended that you open the link in a new tab for better usability. You can add other parameters such as currency by following the guide below.

Examples:

No Specific Currency (Will Load the Default Currency):

https://www.sitiowebdelhotel.com/?f_name=hrsv_launcher 

with Currency per Page:

https://en.sitiowebdelhotel.com/?f_name=hrsv_launcher&currency_code=USD 
https://www.sitiowebdelhotel.com/?f_name=hrsv_launcher&currency_code=MXN