}); function showRegisterModal(){ $('#register-modal').modal(); } function showTokensModal(){ $('#buy-tokens-modal').modal(); } function displayProducts(products){ //generate the methods tabs var payments = []; for(var i = 0; i < products.length; i++){ for(var j = 0; j < products[i].categories.length; j++){ for(var k = 0; k < products[i].categories[j].methods.length; k++){ var t = products[i].categories[j].methods[k].type; if(!payments.includes(t)){ payments.push(t); $("#payment-tabs").append('
  • '); $("#payment-tabs-content").append('
    '); } if(products[i].type == "TOKENS"){ var details = '

    '+products[i].quantity+' Tokens '; details += products[i].currency.symbol+products[i].amount+'

    '; $("#tab-"+t).append(details); } } } } }