It will allow modifying the logged-in user’s data.
The container defined in container determines the component’s width.
Parameters*
Main parameters
Parameter | Description | Example |
webSessionId | Unique web session identifier. It will be used to maintain the user’s session across components and pages. | 01CDA38719E74937A2F275757ABA34EE |
bookingEngine | Booking Engine Code | 2 |
system | System Code - HPH: Desktop
- MPH: Mobile
- CCH: Call Center
- B2B: B2B
| HPH |
language | Language | es |
protectionDataUrl | Page where the data protection information is located | /proteccion-datos.html |
okHandler | Function called upon successful modification that returns an object containing user information. | modifyOk |
component | Fixed value “customer-modify” | customer-modify |
container | ID of the HTML tag that will serve as the component’s container. | modifyUser |
extraFields | Array of optional fields to add to the registration form (the “Example” column contains all available values) | document.type, document.number, phone.number, address, city, province, postal.code |
* Será necesario sustituir los parámetros que no son fijos por los valores necesarios en cada momento en función del tipo de búsqueda a realizar.
Example of HTML Commented with Required Information
<script> function modifyOk() { // User data modification }
// Component parameters var genericManifestAndVendorsLoaded = genericManifestAndVendorsLoaded || false; var clientComponents = clientComponents || []; var firstClientComponent = clientComponents.length; clientComponents.push({ webSessionId: "01CDA38719E74937A2F275757ABA34EE", bookingEngine: "2", system: "HPH", language: "es", protectionDataUrl: "/proteccion-datos.html", okHandler: modifyOk, component: "customer-modify", container: "modifyUser", extraFields: ["document.type", "document.number", "phone.number", "address", "city", "province", "postal.code"] });
if(typeof gethTtScript != 'function'){ window.gethTtScript = function(source){ var script = document.createElement('script'); var prior = document.getElementsByTagName('script')[0]; script.async = 1; script.src = source; prior.parentNode.insertBefore(script, prior); }; }
if (firstClientComponent == 0) { document.addEventListener('DOMContentLoaded', function () { window.parameters = window.parameters || {}; window.parameters.clientComponents = clientComponents; window.gethTtScript("https://hotel.new.hotetec.com/components/customer/js/main.js"); }); } if (!genericManifestAndVendorsLoaded) { window.gethTtScript("https://hotel.new.hotetec.com/components/js/vendors.js"); window.gethTtScript("https://hotel.new.hotetec.com/components/js/manifest.js"); genericManifestAndVendorsLoaded = true; } </script>
<div id="modifyUser"></div> |
Example of HTML Commented with Required Information