<!-- Add the slick-theme.css if you want default styling --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" integrity="sha512-yHknP1/AwR+yx26cB1y0cjvQUMvEa2PFzt1c9LlS4pRQ5NOTZFWbhBig+X9G9eYW/8m0/4OXNx8pxJ6z57x0dw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <!-- Add the slick-theme.css if you want default styling --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" integrity="sha512-17EgCFERpgZKcm0j0fEq1YCJuyAWdz9KUtv1EjVuaOz8pDnh/0nZxmU6BBXwaaxqoi9PQXnRWqlcDB027hgv9A==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" integrity="sha512-XtmMtDEcNz2j7ekrtHvOVR4iwwaD6o/FUJe6+Zq+HgcCsk3kj4uSQQR8weQ2QVj1o0Pk6PwYLohm206ZzNfubg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <style> @font-face { font-family: EuclidCircularB; src: url(https://static.discovery-prod.axs.com/axs/bundles/aegaxs/fonts/Euclid/EuclidCircularB-Regular.woff); } @font-face { font-family: EuclidCircularBold; src: url(https://static.discovery-prod.axs.com/axs/bundles/aegaxs/fonts/Euclid/EuclidCircularB-Bold.woff); } body { background-color: #00175a; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; } #page-modal-wrapper{ background-image: url("https://static.discovery-prod.axs.com/uploads/60dcca8cacf4f-amex-top-header-bg.png"); background-position: top; background-repeat: repeat no-repeat; } .main { color: #fff; } .main img { max-width: 100%; margin-bottom: 10px; } .main .btn-event-status, .main .btn-event-status:active, .main .btn-event-status:visited, .main .btn-event-status:hover { color: white; } .EuclidCircularBold{ font-family: EuclidCircularBold; } .welcome-text { text-align: center; font-family: EuclidCircularB; font-size: 16px; margin: 20px auto 20px auto; max-width: 920px; } .disclaimer { font-size: 12px; margin: 0 auto 30px auto; max-width: 920px; text-align: center; } .search-filters { display: flex; flex-wrap: nowrap; align-items: baseline; } .filter-wrapper { width: 100%; } .filter-wrapper label { display: block; } .filter-wrapper select{ color: lightblue; width: 100%; height: 48px; margin: 11px 0 0; padding: 12px 8px 12px 16px; border: solid 1px #ffffff; background-color: transparent; } .filter-wrapper + .filter-wrapper { margin-left: 10px; } .event-card{ margin: 10px; } .event-link, .event-link:visited, .event-link:hover, .event-link:active{ color: #fff; text-decoration: none; } .event-row { display: flex; align-items: center; flex-wrap: wrap; background-color: #11225f; margin-bottom: 8px; min-height: 79px; } .event-info{ flex: 1 0 auto; padding: 12px; } .event-info > :not(:first-child) { margin-top: 5px; } .event-info-title { font-family: lato-bold; font-weight: bold; font-size: 17px; } .event-info-location { font-size: 13px; } .event-info-weekday { font-family: 'lato-black'; font-weight: bold; } .event-row .event-img { display: none; } .amex-title { font-size: 20px; margin: 50px 0 20px 0; } .carousel { display: none; } .events .event-link { margin-bottom: 10px; } /* ------------------------ TABLET AND DESKTOP------------*/ @media(min-width:550px){ .events .event-wrapper:nth-child(-n+6) { display: none; } .event-info{ flex: 1 0 auto; padding-left: 16px; } .event-row .event-img { width: 136px; display: block; } .carousel { display: block; margin-bottom: 35px; } .disclaimer{ margin: 0 auto 50px auto; } .filter-wrapper select{ width: 214px; } .filter-wrapper { width: auto; } .filter-wrapper + .filter-wrapper { margin-top: auto; margin-left: 30px; } } </style> <main class="main"> <div class="center-text" style="margin-top:50px"> <img src="https://static.discovery-prod.axs.com/uploads/60dccaae9b2fd-amex-logo.png"> </div> <div class="welcome-text"> Welcome to American Express Ticket Offers, powered by AXS. American Express® Card Members can enjoy exclusive access to ticket presales and reserved seating offers across events in music, theater, and sports. To take advantage of these ticket offers, you must purchase with your eligible American Express Card. </div> <div class="disclaimer"> <a href="javascript:void(0)" id="amex-terms-link" style="display: block;color: #fff;margin-top: 10px;"> Terms & Conditions </a> </div> <div class="search-filters"> <div class="filter-wrapper"> <label for="cityLocation"> City </label> <select id="cityLocation"> <option label="Please Select"></option> </select> </div> <div class="filter-wrapper"> <label for="venueLocation">Venue</label> <select id="venueLocation"> <option label="Please Select"></option> </select> </div> </div> <h3 class="amex-title">American Express Ticket Offers</h3> <div id="amex-carousel" class="carousel"></div> <div id="events-list" class="events"></div> <div id="infinite-scroll-spinner" class="center-text" style="margin-top:40px; display:none"> <svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a"> <stop stop-color="#007DFF" stop-opacity="0" offset="0%"/> <stop stop-color="#007DFF" stop-opacity=".631" offset="63.146%"/> <stop stop-color="#007DFF" offset="100%"/> </linearGradient> </defs> <g fill="none" fill-rule="evenodd"> <g transform="translate(1 1)"> <path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#a)" stroke-width="3"> <animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.9s" repeatCount="indefinite" /> </path> <circle fill="#fff" cx="36" cy="18" r="1"> <animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.9s" repeatCount="indefinite" /> </circle> </g> </g> </svg> </div> </main> <div id="amex-modal" class="modal-container full-width-mobile"> <div class="modal myaxs-dialog user-entry no-header"> <h3 class="modal__header"> <a title="close" href="javascript:void(0)" class="js-close-modal pull-right"> <span class="sr-only">Close</span> <svg class="svg-icon--close3 "> <title>Close</title> <use xlink:href="#svg-icon-close3"></use> </svg> </a> </h3> <div class="modal__body"> <span class="bold-text">American Express Early Access</span> <p> American Express® Card Members have exclusive access to tickets before the general public for the specified sales window. Simply pay with your American Express® Card. Tickets are subject to the rules, terms & conditions, and fees set by the ticket seller, promoter and/or the venue, as applicable. Offer is fulfilled by ticket seller, subject to availability and may be changed or revoked at any time. Not all seats available and blackout dates may apply. All sales final. No refunds. No exchanges. For more information, please visit <a href="https://americanexpress.com/entertainment"> americanexpress.com/entertainment.</a> </p> <span class="bold-text">American Express Access</span> <p> The American Express Access program is available to all Card Members. Simply pay with your American Express® Card. Tickets are subject to the rules, terms & conditions, and fees set by the ticket seller, event promoter and/or the venue, as applicable. Offer is fulfilled by ticket seller, subject to availability and may be changed or revoked at any time. Not all seats available and blackout dates may apply. All sales final. No refunds. No exchanges. For more information, please visit <a href="https://americanexpress.com/entertainment"> americanexpress.com/entertainment.</a> </p> <span class="bold-text">American Express Preferred Access</span> <p> The American Express Preferred Access program is exclusively available to eligible* Card Members. Enter the 10-digit Customer Service phone number on the back of your eligible Card when prompted to purchase tickets online, on a mobile device, or over the phone. For limited events on Ticketmaster, connect your Card to your Ticketmaster account online, or on a mobile device, and provide your 15-digit Card Number when prompted. *Preferred Access is available to our U.S. Card Members with the following cards: Platinum Card® or Centurion® Card from American Express, Business Platinum Card®, Business Centurion® Card from American Express, Corporate Platinum Card® or Corporate Centurion® Card from American Express, Delta SkyMiles® Platinum American Express Card, Delta SkyMiles® Platinum Business American Express Card, Delta SkyMiles® Reserve American Express Card, Delta SkyMiles® Reserve Business American Express Card, American Express® Gold Card, Classic Business Gold Card, Business Gold Card, Business Gold Rewards Card, American Express® Corporate Gold Card, the Executive Business Card, Hilton Honors American Express Surpass® Card, Hilton Honors Aspire Card, Marriott Bonvoy Brilliant™ American Express Card, or the Marriott Bonvoy™ American Express Card. Tickets are subject to the rules, terms and conditions and fees set by the official ticket seller, event promoter and/or the venue, as applicable. Offer is fulfilled by official ticket seller, subject to availability and may be changed or revoked at any time. Not all seats available and blackout dates may apply. All sales final. No refunds. No exchanges. For more information, please visit <a href="https://americanexpress.com/entertainment"> americanexpress.com/entertainment.</a> </p> </div> </div> <script id="event-template" type="text/x-handlebars-template"> {{#each . }} <div class="event-wrapper"> <a href="{{eventUrl}}" class="event-link" omid={{omid}}> <div class="{{eventType}}"> <img src="{{imageUrl}}" class="event-img"> <div class="event-info"> <div class="event-info-datetime h-uppercase"> {{#ifvalue eventDateTime equals="TBD"}} <span class="event-info-datetime-tbd"> {{translate "translations.tbd" }} </span> {{else}} {{#if additionalDates.length }} <span class="event-info-datetime-starting"> {{translate "translations.starting" }} </span> {{/if}} <span class="event-info-weekday"> {{formatDate eventDateTime "ddd"}} </span> {{formatDate eventDateTime "D"}} {{formatDate eventDateTime "MMM"}} {{/ifvalue}} {{{ eventStatusIndicator }}} </div> <div class="event-info-title"> {{eventTitle}} </div> <div class="event-info-location"> {{venueName}}, {{city}} {{#if state }} , {{ state }} {{/if }} </div> </div> </div> </a> </div> {{/each }} </script> <script> // Config Params var access_token = 'mDB7xpJjAkkCL6LfFm1NccZk6Sw'; var axsHost = 'https://api.axs.com/'; var promoGroupId = '1'; // Amex Promo var promoTemplateId = '[1,2,3,81,82,83]'; // Amex Templates (us only) var rows = 20; //Number of rows that will be requested each time the api is called var page = 1; var carouselRows = 6; //Minimum Number of events that the Carousel will have. IMPORTANT: also update the class .event-wrapper:nth-child(-n+6) to match this number. var eventsListRows = 9; //Number of events that will be initially displayed in the list var countryCode = 'US'; //Only US promos var venueId = $.QueryString ? $.QueryString['venueId'] : ''; var city = $.QueryString ? $.QueryString['mkt'] : ''; var siteId = 1; var eventIds = []; // Array that keep tracks of all the eventIds that have already been rendered in the page to dedup duplicated ones. $(document).ready(function() { var amexModal = $('#amex-modal').axsModal() $("#amex-terms-link").click(function(){ amexModal.show(); }); $amexCarousel = $('#amex-carousel'); $eventsList = $('#events-list'); var source = $('#event-template').html(); var template = Handlebars.compile(source); init(); $('#cityLocation').change(function (e) { city = $(this).val() || ''; // Resets the venue filter venueId = ''; $('#venueLocation').get(0).selectedIndex = 0; init(); }); $('#venueLocation').change(function (e) { venueId = $('#venueLocation :selected').data('venue-id') || ''; // Resets the city location city = ''; $('#cityLocation').get(0).selectedIndex = 0; init(); }); getVenuesWithPromos().done(function (res){ var cities = []; res.forEach(function (venue) { $('#venueLocation').append('<option data-venue-id="'+ venue['venue_id'] +'">' + venue['venue_name'] + '</select>') if(!cities.includes(venue.city)){ cities.push(venue.city); } }); cities.forEach(function (city) { $('#cityLocation').append('<option>' + city + '</select>') }); }); function init () { axs.Core.LoadingScreen().show(); eventIds = []; page = 1; getPromos(rows).done(function (res) { var promos = res.promotions; if($amexCarousel.hasClass("slick-initialized")){ $amexCarousel.slick("unslick"); } $amexCarousel.empty(); $eventsList.empty(); promos = filterPromosByEventId(res.promotions); if(promos.length > 0){ initCarousel(promos.slice(0, carouselRows)); initEventsList(promos); } else { $amexCarousel.text("Sorry, there are no events."); } axs.Core.LoadingScreen().hide(); initScrollListener(); }); } function initCarousel(promos) { var parsedPromos = parsePromoObject(promos, "event-card"); var htmlTemplate = template(parsedPromos); $amexCarousel.append(htmlTemplate); $amexCarousel.slick({ slidesToShow: 3, slidesToScroll: 3, autoplay: true, autoplaySpeed: 5000, }); } function initEventsList(promos){ var parsedPromos = parsePromoObject(promos, "event-row"); var htmlTemplate = template(parsedPromos); $eventsList.append(htmlTemplate); } function filterPromosByEventId(promos) { var filteredPromos = []; promos.forEach(function (promo) { var event = promo.events[0]; if(!eventIds.includes(event.eventId)){ filteredPromos.push(promo); eventIds.push(event.eventId); } }); return filteredPromos; } function initScrollListener() { $(window).off("scroll"); var $spinner = $("#infinite-scroll-spinner"); var currentscrollHeight = 0; $(window).on("scroll", function () { var scrollHeight = $(document).height(); var scrollPos = Math.floor($(window).height() + $(window).scrollTop()); var isBottom = scrollHeight - 300 < scrollPos; if (isBottom && currentscrollHeight < scrollHeight) { $spinner.show(); getPromos(rows, ++page).done(function (res) { var promos = filterPromosByEventId(res.promotions); initEventsList(promos); $spinner.hide(); }); currentscrollHeight = scrollHeight; } }); } }); function parsePromoObject(promos, type){ var promosObj = []; promos.forEach(function (promo, i){ var event = promo.events[0]; promosObj[i] = {}; promosObj[i].eventTitle = event.title.eventTitleText; // promosObj[i].promoName = promo.promotionName; promosObj[i].imageUrl = event.relatedMedia[17] !== null ? event.relatedMedia[17].file_name : '' ; promosObj[i].venueName = event.venue.title; promosObj[i].city = event.venue.city; promosObj[i].state = event.venue.state; promosObj[i].eventUrl = event.ticketing.eventUrl; promosObj[i].eventDateTime = event.eventDateTime; promosObj[i].eventType = type; promosObj[i].additionalDates = event.additionalDates; promosObj[i].omid = "AMEXUSMICROSITE:EVENTID:" + event.eventId; promosObj[i].eventStatusIndicator = getEventStatusIndicator(event.ticketing.statusId); }); return promosObj; } function getPromos(rows, page){ var page = page || 1; var startDateTime = ""; // moment().subtract(6, 'months').utc().format('YYYY-MM-DDT00:00:00'); // Display promos that has started from a month ago. var url = axsHost + "v1/promotions?access_token="+ access_token +"&siteId="+ siteId +"&group="+promoGroupId+"&rows="+rows+"&page="+page+"&tpl="+promoTemplateId+"&city="+ city + "&cc="+ countryCode + "&start=" + startDateTime + "&venueId=" + venueId + "&pastEvents=false&order=DESC" ; return $.get(url); } function getVenuesWithPromos(){ return $.get(axsHost + 'v1/venues/from/promos?access_token='+ access_token +'&groupTypeId='+ promoGroupId+'&cc=1'); } function getEventStatusIndicator(statusId) { var className = null; var ctaLabel = null; switch (statusId) { case 2: className = "cancelled"; ctaLabel = translations.cta.tags.cancelled; break; case 5: case 37: className = "postponed"; ctaLabel = translations.cta.tags.postponed; break; case 6: className = "rescheduled"; ctaLabel = translations.cta.tags.rescheduled; break; case 36: className = "suspended"; ctaLabel = translations.cta.tags.suspended; break; case 38: className = "rescheduled"; ctaLabel = translations.cta.tags.rescheduledNewDateAndVenue; break; case 11: className = "rescheduled"; ctaLabel = translations.cta.tags.venueChange; break; } if (!className) { return ""; } className = 'btn-event-status btn-event-status-' + className; return "<span class='" + className + "' style='margin-left:10px;display:inline;'>" + ctaLabel + "</span>"; } </script> </div>