'; } if (a.dataset.multi != "true") { classInfo += 'SELECT A TICKET TYPE
FOR THE SEAT YOU CHOSE'; } classInfo += '
'; if (availMemberTickets > appliedMemberTickets && (maxMemberTickets == 0 || appliedMemberTickets < maxMemberTickets)) { classInfo += '
MEMBERSHIP TICKETS
'; if (availMemberTickets > appliedMemberTickets) classInfo += '
YOU HAVE ' + (availMemberTickets - appliedMemberTickets) + ' FREE MEMBER TICKET(S) AVAILABLE
'; let availTickets = ticketPriceGroups[a.dataset.pricegroup]; availTickets.forEach(function(ticket) { if (ticketClasses[ticket]) { let tmpTicket = ticketClasses[ticket]; let linkedPricing = 0; if (tmpTicket.linkedItems.length > 0) { for (let a = 0; a <= (tmpTicket.linkedItems.length - 1); a++) { linkedPricing += tmpTicket.linkedItems[a].pricex100 * tmpTicket.linkedItems[a].amount; } } let taxVal = (incTax == 1) ? parseInt(tmpTicket.tax1x100, 10) + parseInt(tmpTicket.tax2x100, 10) : 0; let serFee = (incFee == 1) ? parseInt(175, 10) : 0; let feeText = (incFee == 1) ? '($' + ((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + taxVal) / 100).toFixed(2)+' ' + (translate_array['ticket'] ?? 'Ticket') + ' ' + (serFee / 100).toFixed(2) + ' ' + (translate_array['conv. fee'] ?? 'Conv. Fee') + ')' : ''; let priceText = ((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + serFee) > 0) ? '$'+((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + taxVal + serFee) / 100).toFixed(2) : ''; if (tmpTicket.bonus == true) classInfo += '
'+tmpTicket.appName+''+priceText+'' + feeText +'
'; } }); } if (memberOnlyTicket != null && Object.keys(memberOnlyTicket).length > 0) { classInfo += '
MEMBER EXCLUSIVE TICKETS
'; Object.keys(memberOnlyTicket).forEach(key => { let tmpTicket = memberOnlyTicket[key]; let linkedPricing = 0; if (tmpTicket.linkedItems.length > 0) { for (let a = 0; a <= (tmpTicket.linkedItems.length - 1); a++) { linkedPricing += tmpTicket.linkedItems[a].pricex100 * tmpTicket.linkedItems[a].amount; } } let taxVal = (incTax == 1) ? parseInt(tmpTicket.tax1x100, 10) + parseInt(tmpTicket.tax2x100, 10) : 0; let serFee = (incFee == 1) ? parseInt(175, 10) : 0; let feeText = (incFee == 1) ? '($' + ((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + taxVal) / 100).toFixed(2)+' ' + (translate_array['ticket'] ?? 'Ticket') + ' ' + (serFee / 100).toFixed(2) + ' ' + (translate_array['conv. fee'] ?? 'Conv. Fee') + ')' : ''; let tmpPrice = (parseInt(tmpTicket.pricex100, 10) > 0) ? ' ($'+((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + taxVal + serFee) / 100).toFixed(2)+')' : ''; classInfo += '
'+tmpTicket.appName+'$'+((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + taxVal + serFee) / 100).toFixed(2)+'' + feeText +'
'; }); } if (typeof memberOnlyTicket !== 'undefined' && Object.keys(memberOnlyTicket).length == 0) { classInfo += '
STANDARD TICKETS
'; let availTickets = ticketPriceGroups[a.dataset.pricegroup]; availTickets.forEach(function(ticket) { if (ticketClasses[ticket]) { tmpTicket = ticketClasses[ticket]; let linkedPricing = 0; if (tmpTicket.linkedItems.length > 0) { for (let a = 0; a <= (tmpTicket.linkedItems.length - 1); a++) { linkedPricing += tmpTicket.linkedItems[a].pricex100 * tmpTicket.linkedItems[a].amount; } } let taxVal = (incTax == 1) ? parseInt(tmpTicket.tax1x100, 10) + parseInt(tmpTicket.tax2x100, 10) : 0; let serFee = (incFee == 1) ? parseInt(175, 10) : 0; let feeText = (incFee == 1) ? '($' + ((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + taxVal) / 100).toFixed(2)+' ' + (translate_array['ticket'] ?? 'Ticket') + ' ' + (serFee / 100).toFixed(2) + ' ' + (translate_array['conv. fee'] ?? 'Conv. Fee') + ')' : ''; if (tmpTicket.pricex100 > 0 && tmpTicket.bonus == false) classInfo += '
'+tmpTicket.appName+'$'+((parseInt(tmpTicket.pricex100, 10) + parseInt(linkedPricing, 10) + taxVal + serFee) / 100).toFixed(2)+'' + feeText +'
'; if (tmpTicket.appDesc == 'requiredSelection-Meal') classInfo += 'This ticket requires an additional selection to be made'; } }); } classInfo += '
'; for (let i = 0; i <= (SeatTicketArray.length - 1); i++) { const tmp = SeatTicketArray[i].split(","); let price = ((parseInt(tmp[3], 10) + parseInt(tmp[4], 10) + parseInt(tmp[5], 10) + parseFloat(tmp[13])) / 100); price = price.toFixed(2); cartInfo += 'Seat '+tmp[0]+' - '+tmp[2]+' ($'+price+')
'; } cartMessage= 'CONTINUE WITH SEAT SELECTION THEN'; //document.getElementById('cartMessage').innerHTML = cartMessage; document.getElementById('cartInfo').innerHTML = cartInfo; document.getElementById('nextBtn').innerHTML = 'ADD TO CART'; document.getElementById('nextBtn').style.backgroundColor = 'var(--mmBlue)'; document.getElementById('nextBtn').style.color = 'white'; if (document.getElementById('nextBtn2')) document.getElementById('nextBtn2').style.display = 'block'; } if (SeatTicketArray.length <= 0) { document.getElementById('cartInfo').innerHTML = ''; document.getElementById('nextBtn').innerHTML = 'SELECT A SEAT TO GET STARTED'; document.getElementById('nextBtn').style.backgroundColor = 'var(--main)'; document.getElementById('nextBtn').style.color = 'var(--font)'; if (document.getElementById('nextBtn2')) document.getElementById('nextBtn2').style.display = 'none'; } } function verifySeats(a) { let addToCartAction = 'Cart'; if (!a || a != 'checkout') addToCartAction = 'Cart'; if (seats.length <= 0) fancyAlert('Please select at least 1 seat to continue'); if (seats.length > 0) { fancyAlert('Please wait a moment while we confirm your seat selection', ''); const payLoad = JSON.stringify({ perf: 375759, seats: seats, linkedItems: linkedItems, seatNames: SeatTicketArray, site: 316579, film: 4358, movie: 1943 }); fetch('include/doVerifySeats.php', { method: 'POST', mode: 'cors', cache: 'no-cache', credentials: 'same-origin', headers:{ 'Content-Type':'application/json' }, redirect: 'follow', referrerPolicy: 'no-referrer', body: payLoad }) .then(function(response){ return response.json() }) .then(function(data){ if (data.status == 'success') { location.href = addToCartAction; } if (data.status != 'success') { fancyAlert(data.errorMsg); if (data.rtsResponse) { let rtsInfo = data.rtsResponse; let violators = rtsInfo.violators; violators.forEach(function(badseat) { document.getElementById(badseat).style.color = 'pink'; }); } } }) .catch((error) => { console.error('Error:', error); fancyAlert('Something went wrong!'); }); } } function getSeatData() { payLoad = JSON.stringify({ perf: 375759, site: 316579 }); fetch('include/getSeatData.php', { method: 'POST', mode: 'cors', cache: 'no-cache', credentials: 'same-origin', headers:{ 'Content-Type':'application/json' }, redirect: 'follow', referrerPolicy: 'no-referrer', body: payLoad }) .then(function(response){ return response.json() }) .then(function(data){ console.log(data); if (data.status == 'success') { doRenderSeatMap(data); } }) .catch((error) => { console.error('Error:', error); fancyAlert('Unable to retreive seat charts'); }); } $(function() { getSeatData(); });