...
Code Block |
---|
|
<html>
<head>
<!-- import your css here -->
<link rel="stylesheet" type="text/css" href="https://my.css">
</head>
<body>
<!-- there should be only one div as child of the body tag -->
<div>
<!-- the header or the footer content should be here -->
<a href="#" id="my_account" class="hide">My account</a>
<a href="#" id="my_account_mobile"> ☰ </a>
</div>
<!-- import your scripts here -->
<script type="text/javascript">
var SecuTixAPI = window.parent.SecuTixAPI;
if (!SecuTixAPI.getContact()) {
var myAcountLink = document.getElementByHide("my_account");
myAcountLink .classList.remove("hide");
myAcountLink.attributes.href.value = SecuTixAPI.getUrls().account;
}
document.getElementById("my_account_mobile").addEventListener(function (event) {
event.preventDefault();
SecuTixAPI.toggleSecutixMobileMenu();
});
</script>
</body>
</html> |
...
Code Block |
---|
|
/**
* Return available urls:
* {
* account: // url to account page
* cart: // url to cart page
* continueShopping: // url to continue shopping
* logout: // url to logout the user
* langs: // map of urls for the langs. Keys are the language codes
* }
* @returns {Object}
*/
getUrls: function () {} |
Code Block |
---|
|
/**
* Get the current content of the cart. Null is empty. Otherwise:
* {
* nbItems: // number of items in cart {number}
* amount: // amount of cart as {string}
* currency: // currency of the amount
* }
*
* @returns
*/
getCart: function () {} |
...
SecuTix expose une méthode pour manipuler le menu mobile fourni par défaut par le tunnel d'achat. Par exemple, vous pouvez ouvrir le menu SecuTix mobile lorsque l'utilisateur clique sur un bouton menu dans le header.
Code Block |
---|
|
/**
* Show or hide the secutix mobile menu.
* @param {boolean} show
* @returns
*/
toggleSecutixMobileMenu: function (show) {} |