--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CommonApps-EventManagement_V3</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
\r
// Check if there's been anything added to the cart and get cart contents\r
$cart = $Support->checkCart();\r
-;\r
+\r
// If we're already locked into checkout, go there\r
if ($cart['forceCheckoutPhase']) {\r
$this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
$cart = $Support->checkCart(true);\r
}\r
\r
-if (!$cart['cartHasContents']) {\r
+if (!$cart['cartHasContents'] || !$cart['totals']['tickets'] || $cart['totals']['tickets'] <= 0) {\r
$this->reason[] = 'Your cart is currently empty.';\r
+ $this->reason = array_merge($this->reason, $cart['reason']);\r
include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/cart.inc';\r
return;\r
}\r
+\r
$this->page->cartHasContents = true;\r
\r
// Check if there been partial payment and we're in a forced checkout phase - no cart changes or additions\r
// If this an admin user\r
$noPaymentReasons = false;\r
if ($this->page->adminUser) {\r
- \r
+\r
// Get the misc settings\r
require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';\r
$Misc = new EventManagementAdminMisc($this->dbh, $this->config);\r
$miscDetail = $Misc->getEntry(1);\r
- \r
+\r
// If we have reasons for no payment\r
if (trim($miscDetail['no_payment_reasons']) != '') {\r
\r
// Break it into an array and add to page data\r
$noPaymentReasons = explode(PHP_EOL, $miscDetail['no_payment_reasons']);\r
$this->page->noPaymentReasons = $noPaymentReasons;\r
- \r
+\r
}\r
\r
}\r
\r
-\r
unset($formData['payment']);\r
\r
// Otherwise we're OK to continue showing the cart\r
$this->page->cartRequiresPayment = $cart['cartRequiresPayment'];\r
$this->page->totals = $this->bindArrayToObject($cart['totals']);\r
$this->page->formData = $this->bindArrayToObject($formData); // Blank form data for cleared fields\r
-$this->reason = array_merge($this->reason, $cart['reason']);\r
+$this->page->reason = array_merge($this->reason, $cart['reason']);\r
\r
$this->templateFile = "Shop/checkout.html";\r
\r
// Need this before we put together the E-Mail summaries\r
$this->page->promoCode = $_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'];\r
\r
-// Check if there hasn't been a complete checkout yet.\r
+// If there's a problem with the cart, send the user back to the cart page\r
+if ($cart['status'] == false || $cart['blockCheckout']) {\r
+ $this->reason = array_merge($this->reason, $cart['reason']);\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/cart.inc';\r
+ return;\r
+}\r
+\r
+// Check if there hasn't been a complete checkout yet\r
if (!$cart['checkoutComplete']) {\r
\r
// Check for empty cart\r
return;\r
}\r
\r
- // If there's a problem with the cart, send the user back to the cart page\r
- if ($cart['status'] == false) {\r
- $this->reason = array_merge($this->reason, $cart['reason']);\r
- include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
- return;\r
- }\r
-\r
/*\r
* Check the submitted input for required and valid fields\r
*/\r
require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
\r
-// Check If we're already locked into checkout, if so then go there\r
+// Get and check cart and save any problem reasons\r
$cart = $Support->checkCart();\r
+if (isset($cart['reason']) && is_array($cart['reason'])) {\r
+ $this->reason = array_merge($this->reason, $cart['reason']);\r
+}\r
+\r
+// Check If we're already locked into checkout, if so then go there\r
if ($cart['forceCheckoutPhase']) {\r
$this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
\r
// If we didn't get any performances to select from\r
if (!$havePerformances) {\r
-echo "....";\r
$this->reason[] = 'There are no available '.$this->config->term->event->plur.'.';\r
}\r
\r
// Get available and held quantities.
$sql = "
SELECT I.available as available,
+ I.active as active,
T.unlimited_quant as unlimited_quant,
(
SELECT SUM(quant)
$performanceDetail = $this->getPerformanceData($ticketDetail['performance_id']);
// Make sure we have all needed information - Perhaps something has been deleted
- if ($ticketDetail && $memberDetail && $memberDetail['active']['value'] && $sectionDetail && performanceDetail) {
+ if ($ticketDetail && $memberDetail && $memberDetail['active']['value'] && $sectionDetail && $performanceDetail) {
// If Venue/Member hasn't been added yet
$membID = $memberDetail['id'];
$tickets[$ticID]['packageData'] = $packageData;
}
+ // Check to make sure that the selected number of tickets is currently available
+ if ($c['quant'] > $tickets[$ticID]['thisSessionSelectable'] || !$invStatus['active'] || $c['quant'] <= 0) {
+ // Remove this item from the cart
+ unset($_SESSION[GLM_EVENT_SESSION]['TicketCart'][$invID]);
+ unset($tickets[$ticID]);
+ $cartItemRemoved = true;
+ $totalTickets -= $c['quant'];
+ $reason[] = "A ticket was removed from your cart because it's no longer available.";
+
+ }
// We apparently don't have all needed data for this cart entry
// Something has been turned off or deleted
*/
// Sort Members
- uasort ($rCart, function ($a, $b) {
- if ($a['sort'] == $b['sort']) {
- return 0;
- }
- return ($a['sort'] < $b['sort']) ? -1 : 1;
- });
+ if (is_array($rCart)) {
+ uasort ($rCart, function ($a, $b) {
+ if ($a['sort'] == $b['sort']) {
+ return 0;
+ }
+ return ($a['sort'] < $b['sort']) ? -1 : 1;
+ });
+ }
+
// For each Member
while (list($k1, $v1) = each($rCart)) {
$rCart[$k1]['isCentralPaymentMember'] = false;
// Sort Performances
- uasort ($rCart[$k1]['performances'], function ($a, $b) {
- if ($a['sort'] == $b['sort']) {
- return 0;
- }
- return ($a['sort'] < $b['sort']) ? -1 : 1;
- });
+ if (is_array($rCart[$k1]['performances'])) {
+ uasort ($rCart[$k1]['performances'], function ($a, $b) {
+ if ($a['sort'] == $b['sort']) {
+ return 0;
+ }
+ return ($a['sort'] < $b['sort']) ? -1 : 1;
+ });
+ }
// For each Performance
while (list($k2, $v2) = each($rCart[$k1]['performances'])) {
while (list($k3, $v3) = each($rCart[$k1]['performances'][$k2]['dates'])) {
// Sort Sections
- uasort ($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'], function ($a, $b) {
- if ($a['sort'] == $b['sort']) {
- return 0;
- }
- return ($a['sort'] < $b['sort']) ? -1 : 1;
- });
-
- // For each Section
- while (list($k4, $v4) = each($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'])) {
-
- // Sort Tickets
- uasort ($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'][$k4]['tickets'], function ($a, $b) {
+ if (is_array($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'])) {
+ uasort ($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'], function ($a, $b) {
if ($a['sort'] == $b['sort']) {
return 0;
}
return ($a['sort'] < $b['sort']) ? -1 : 1;
});
+ }
+
+ // For each Section
+ while (list($k4, $v4) = each($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'])) {
+
+ // Sort Tickets
+ if (is_array($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'][$k4]['tickets'])) {
+ uasort ($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'][$k4]['tickets'], function ($a, $b) {
+ if ($a['sort'] == $b['sort']) {
+ return 0;
+ }
+ return ($a['sort'] < $b['sort']) ? -1 : 1;
+ });
+ }
} // Sections
} // Dates
$r['cartRequiresPayment'] = false;
}
+ // If total tickets is now 0, then we need to block checkout
+ if ($totalTickets <= 0) {
+ $r['blockCheckout'] = true;
+ }
+
// Return cart output data and indicate success
$r['cartData'] = $cartData;
$r['cartItemRemoved'] = $cartItemRemoved;
--- /dev/null
+Gaslight Media - Event Management V3
+On-Line Ticketing System
+Version: 3.0.1
+Revision Date: 7/19/19
+Revision Author: Chuck Scott
<div class="emCalHeadCell" day="emCalMonthJanSun">Sat</div>
</div> <!-- emCalHead -->
{foreach:m.weeks,w}
- {if:w.weekUsed}
+ {if:w.weekUsed}
<div class="emCalWeek">
{foreach:w.days,d}
{if:d.isDate}
<div class="emCalDateTitle">{d.dom}</div>
<div class="emCalDateEditLinks">
<img src="{baseURL}common/EventManagement/admin/icons/page_edit.png" class="emCalDateEditIcon" invId="{d.id}" calDate="{d.time}">
- </div>
+ </div>
</div>
<div class="emCalData">
<div class="emCalDataRow">
<div class="emCalCap">Quantity: </div>
<div id="quant_{d.time}" class="emCalValue">Unlimited</div>
</div>
- {else:}
+ {else:}
<div class="emCalDataRow">
<div class="emCalCap">Quantity: </div>
<div id="quant_{d.time}" class="emCalValue">{d.quant}</div>
<div class="emCalDateCell emCalDateCellNotice">
<div class="emCalDate">
<div class="emCalDateTitle">{d.dom}</div>
- <div class="emCalDateEditLinks"></div>
+ <div class="emCalDateEditLinks"></div>
</div>
<div class="emCalData">
</div>
- </div>
- {end:}
+ </div>
+ {end:}
{else:}
<div class="emCalNoDateCell"> </div>
{end:} <!-- isDate -->
- {end:} <!-- days -->
+ {end:} <!-- days -->
</div> <!-- emCalWeek -->
{end:} <!-- weekUsed -->
{end:} <!-- weeks -->
</div> <!-- emCalMonth -->
{end:} <!-- ticketCalendar -->
- </div> <!-- emCalendars -->
+ </div> <!-- emCalendars -->
<ul>
<li>Click date cell to dissable or enable a partcular date.</li>
<li>Click on edit icon to change the values.</li>
</ul>
-
+
</div> <!-- emBlock -->
{startScript:h}
$(function() {
-
+
// Send user notice if they click a non-inventory cell
$('.emCalDateCellNotice').click( function() {
alert('This is not within the date range for the {term.performance.norm}. To add inventory for this date, edit the {term.performance.norm} and change the start or end date.');
});
-
+
// Toggle date cell on-off
$('.emCalDateCellSelectable').click( function() {
-
+
var thisCell = $(this);
- var thisId = $(this).attr('invId');
+ var thisId = $(this).attr('invId');
var invStatus;
-
+
// If the cell is currently selected
if (thisCell.hasClass("emCalDateCellSelected")) {
invStatus = 0; // Change to not selected
} else {
invStatus = 1; // Otherwise change to selected
}
-
-
+
+
$.ajax({
url: "{adminURL}&Action=Ticket_setActive&TicketInventoryID=" + thisId + "&TicketInventoryStatus=" + invStatus,
- success: function() {
+ success: function() {
// Update cell status display
if (invStatus == 1) {
thisCell.addClass('emCalDateCellSelected');
thisCell.removeClass('emCalDateCellSelected');
}
} ,
- error: function() {
+ error: function() {
alert(
'There was an error while submitting this information.\n' +
'The information may not have been updated.\n' +
);
}
});
-
+
});
+ var editDialog = false;
// Pop-up calendar edit forms
$('.emCalDateEditIcon').click( function() {
+ // If there's a remnant of a prior calEdit dialog, destroy it
+ if (editDialog) {
+ editDialog.remove();
+ editDialog = false;
+ }
+
// get needed parameters
var dateTime = $(this).attr('calDate');
- var thisId = $(this).attr('invId');
+ var thisId = $(this).attr('invId');
var thisTime = $('#ticket_time_' + dateTime).html();
var thisQuant = $('#quant_' + dateTime).html();
var thisAvail = $('#avail_' + dateTime).html();
var thisSold = $('#sold_' + dateTime).html();
+
// Place edit form in cell edit container
$('#edit_'+dateTime).html(' \
<div id="calEdit" title="Edit Inventory Date"> \
</div> \
');
- // Start dialog pop-up
- $('#calEdit').dialog({
+ // Start dialog pop-up
+ editDialog = $('#calEdit').dialog({
autoOpen: true,
modal: true,
position: {
$('#calEditPleaseWait').html('<div class="emBLock"><div class="emLoading">Storing, Please Wait...</div></div>');
var tf = $(this);
-
- // Submit form
+
+ // Submit form
$('#calEditForm').ajaxForm({
- success: function(data) {
-
+ success: function(data) {
+
// Copy data from pop-up back to selected calendar date
var valEditTime = $("#calEditTime").val();
var valEditQuant = $("#calEditQuant").val();
$('#quant_' + dateTime).html( valEditQuant );
$('#avail_' + dateTime).html( valEditAvail );
$('#sold_' + dateTime).html( valEditSold );
-
+
// Destroy dialog pop-up
tf.dialog( "close" );
tf.dialog('destroy').remove();
return false;
-
+
} ,
error: function() {
-
+
// If the data was not able to be submitted
alert(
'There was an error while submitting this information.\n' +
'The information may not have been updated.\n' +
'Please try again later or call for support.'
);
-
+
// Destroy dialog pop-up
tf.dialog( "close" );
tf.dialog('destroy').remove();
return false;
-
+
}
});
-
+
// Kick ajaxForm submission
$('#calEditForm').submit();
}
}
});
-
+
return false;
});
f_restartOnTabSelect();
-
+
});
</script>
{end:}
</ul>
</div>
- {end:}
- {if:havePromoCodes}
- <div class="glmCartBlock">
- <div class="glmCartFormInput">
- <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
- </div>
- </div>
+ {else:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
{end:}
{foreach:cart,c}<!-- each venue -->
<div class="glmCartBlock">
<!--<a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 0px;">{term.nav.select_more_of_these}</a>-->
{end:}
<div class="glmCartEventInfoLeft">
-
+
<div class="glmCartEventTitle">{c.name:h} - {p.name}</div>
<div class="glmDescr">
{if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
{if:d.dateSpecific}
{d.fullDate}
{else:}
-
+
{if:c.likelyDate}
- Likely Date {c.likelyDate}
{end:}
{end:}
{if:option.cart_images}{if:i.image}
<div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
- {end:}{end:}
+ {end:}{end:}
<div class="glmBlockContentLeft">{i.descr:h}</div>
</td>
</tr>
{end:}
{end:} <!-- each entrances -->
{end:} <!-- each assignmentMembers -->
- <br>
+ <br>
{end:} <!-- if needAssignment -->
<!-- Likely date for non-date-specific tickets -->
{if:option.ask_for_likely_date}
{end:} <!-- if ask_for_likely_date -->
</div> <!-- ask where tickets are sold -->
</div> <!-- glmCartBlock -->
- {end:} <!-- needAssignemntOrDate -->
+ {end:} <!-- needAssignemntOrDate -->
{if:!c.needAssignment}
<!-- glmCartVenueInfo -->
{if:option.cart_images}{if:c.image}
<!-- glmCartBlock - Selection Summary -->
<div class="glmCartBlock totals">
- {if:cartHasContents}
+ {if:cartHasContents}
<div class="glmGrandTotals">
Grand Total {totals.price}
</div>
<div class="glmCartWide">
- {if:totals.tickets}
+ {if:totals.tickets}
<!-- {if:!blockCheckout} -->
<a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
<!-- {else:}
- <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
{end:} -->
{else:}
<a class="glmNavItemInactive">Your cart is currently empty.</a>
{end:}
</div>
{else:}
- <P>Your cart is currently empty.</P>
+ <P>Your cart is currently empty.</P>
{end:}
</div> <!-- glmCartBlock -->
<div class="glmBlockContentLeft cartContent">
{if:p.start_date}
<p>
- Dates: {p.start_date.date}
+ Dates: {p.start_date.date}
</p>
{end:}
<!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
{if:p.short_descr}<div class="glmCartEventDescr promoDescr">{p.short_descr:h}</div>{end:}
- {if:p.short_descr}<div class="glmCartEventDescrMobile promoDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile promoDescrMobile">{p.short_descr:h}</div>{end:}
</div>
</div>
{end:}
// Convert input fields to select lists
$('.glmCartQuant').each(function() {
-
+
var id = $(this).attr('id');
var ticket = $(this).attr('data-ticket');
var addon = $(this).attr('data-addon');
// Build a picklist for this input
for (var i = 0 ; i {lte:h} max ; i++) {
if (value == i) {
- numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
} else {
numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
- }
+ }
}
-
+
$('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
-
+
});
// Get or set vertical scroll to return to same place when cart reloads
if (vertScroll == 0) {
var vertScroll = document.body.scrollTop;
}
- return vertScroll;
+ return vertScroll;
}
// When a cart value changes, submit it as a cart update.
var ticket = $(this).attr('data-ticket');
var addon = $(this).attr('data-addon');
var value = $(this).val();
-
+
setBlocker();
window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
-
+
});
// When there's a change in the promo code input, submit it.
// When a likely departure date changes, submit it so it's in the session
$('.glmLikelyDateChange').change(function() {
- vertScroll = getVertScroll();
+ vertScroll = getVertScroll();
var member = $(this).attr('data-Member');
var likelyDate = $(this).val();
setBlocker();
window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
-
+
});
-
+
// Code to start datepicker for each date input
if($("#likelyDateInput").length > 0) {
$("#likelyDateInput").datepicker({
minDate: -1,
maxDate: 365
});
- }
+ }
// Checkout action
$('#GLMcheckoutBtn').click(function() {
- setBlocker();
+ setBlocker();
window.location = "{baseSCRIPT}&Action=Shop_checkout";
});
function setBlocker() {
$('#glmReloadBlocker').show();
}
-
+
$('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
setBlocker();
window.location = '{startURL:h}';
});
-/* Not using right now
+/* Not using right now
// Reprint order button
$('#reprintVoucher').on('keypress', function(event) {
if(event.which == '13'){
var orderID = $(this).val();
- var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
- "voucherPrint",
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
"height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
);
voucherWindow.focus();
}
});
*/
-
+
if ({vertScroll}) {
window.scrollTo(0,{vertScroll});
}
-<!--
+<!--
Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
-->
<a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
{if:!option.ticket_selection.start_at_cart}
<a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
- {end:}
+ {end:}
</div>
</div><!--/#GLMHeader-->
<!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
</div><!--/.glmCartFormLine-->
<div class="glmCartFormLine">
<div class="glmCartFormPrompt">Receive E-Newsletter?</div>
- {if:formData.contact.email_ok}
- <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked>
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked>
{else:}
<div class="glmCartFormInput"><input type="checkbox" name="email_ok">
{end:}
</div>
</div><!--/.glmCartFormLine-->
{end:}
-
-
+
+
</div> <!--/.glmCartForm-->
</div><!--/.glmCartBlock-->
-
+
{foreach:cart,c} <!-- each venue -->
{if:c.performances}
<div class="glmCartBlock">
<div class="glmCartBlockTitle">{term.prop.cap}: {c.name:h}</div>
<!-- glmCartVenueInfo -->
-<!--
+<!--
<div class="glmCartVenueInfo">
{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}
{if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}
</div>
--->
+-->
<div class="glmCartEvents">
-
+
{foreach:c.performances,p} <!-- each performance for this date -->
-<div class="glmCartBlock">
+<div class="glmCartBlock">
<div class="glmCartEvent">
<div class="glmCartEventInfo">
<div class="glmCartEventInfoLeft">
</div><!--/.glmCartBlockText-->
</div><!--/.glmCartEventInfoLeft-->
</div><!--/.glmCartEventInfo-->
- <div class="glmCartBlockDates">
+ <div class="glmCartBlockDates">
{foreach:p.dates,d}
<div class="glmCartBlockDate">
<div class="glmDescr">
{if:d.dateSpecific}
{d.fullDate}
{else:}
-
+
{if:c.likelyDate}
- Likely Date {c.likelyDate}
{end:}
{if:i.time_specific.value}
<!-- NOT SHOWING TIME RIGHT NOW - {i.ticket_time.time} -->
{else:}
-
+
{end:}
</td>
<td align="right">{if:i.show_price}{i.price}{end:}</td>
{if:i.image}
<div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
{end:}
- {end:}
+ {end:}
<div class="glmBlockContentLeft">{i.descr:h}</div>
</td>
</tr>
<div class="glmSection">
<div class="glmSectionName">
Please read and agree to our policy for this {term.performance.norm}.
- </div>
+ </div>
<div class="glmBlockContent">
<p>{p.policy:h}</p>
</div>
</div>
</div>
{end:}
-</div>
+</div>
{end:} <!--each performance-->
</div><!--/.glmCartEvents-->
<!-- glmCartVenueTotal - Sub totals for this venue -->
{if:!formData.centralPayment}
<div class="glmCartForm">
-<!--
+<!--
{if:!cartHasOneVenueOnly}
<div class="glmCartSubTotals">
<div class="glmCartTable sub">
</div>
</div>
{end:}
--->
+-->
{if:c.paymentResult}
{if:c.paymentResult.approved}
<div class="glmCartBlockSTitle">Card Payment Approved</div>
<select name="{c.id}_cctype">
<option value=""> </option>
{foreach:c.paymentForm.cctype.ccards,a}
- {if:a.selected}
+ {if:a.selected}
<option value="{a.value}" selected>{a.name}</option>
{else:}
<option value="{a.value}">{a.name}</option>
</span>
{end:} <!-- havePaymentMethod -->
{end:} <!-- if payment not approved -->
-
+
</div> <!-- glmCartForm - Venue Payment -->
</div> <!-- glmCartPayment -->
-
+
{end:} <!-- if not central payment -->
</div> <!-- glmCartBlock -->
</div>
{end:} <!-- if Performances -->
- {if:!cartRequiresPayment}
+ {if:!cartRequiresPayment}
<input type="hidden" name="{c.id}_payTypeSelect" value="no">
{end:}
-
+
{end:} <!-- each venue -->
-
-{if:cartRequiresPayment}
- {if:formData.centralPayment}
+
+{if:cartRequiresPayment}
+ {if:formData.centralPayment}
<div class="glmCartBlock">
{if:formData.centralPayment.havePaymentMethod}
-
+
{foreach:formData.centralPayment.paymentForm,p} <!-- This is a pseudo-loop since there should only be one entry. Keeps data consistent. -->
{if:p.cctype}
<!-- Credit Card Payment Form -->
-
+
<span id="{formData.centralPayment.id}_glmPayByCC" class="">
<div class="glmCartFormLine">
<div class="">
<select name="{formData.centralPayment.id}_cctype">
<option value=""> </option>
{foreach:p.cctype.ccards,a}
- {if:a.selected}
+ {if:a.selected}
<option value="{a.value}" selected>{a.name}</option>
{else:}
<option value="{a.value}">{a.name}</option>
{end:} <!-- /Have Credit Cards -->
{end:} <!-- foreach payment -->
- </div>
-
+ </div>
+
{else:} <!-- /havePaymentMethod -->
<span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
<div class="glmCartFormPrompt glmCartRequired">
Please call this {term.prop.norm} to purchase {term.ticket.plur}.
</div>
</span>
-
+
{end:} <!-- /havePaymentMethod -->
{end:} <!-- Central Payment -->
-{end:} <!-- Cart Requires Payment -->
-
+{end:} <!-- Cart Requires Payment -->
+
<!-- glmCartBlock - Selection Summary -->
<!-- glmCartBlock - A Venue -->
<div class="glmCartBlock">
- {if:cartRequiresPayment}
+ {if:cartRequiresPayment}
<div style="float: left;">
<div class="glmCartBlockTitle">Complete Purchase</div>
-<!-- NOT DISPLAYING THESE NOW
+<!-- NOT DISPLAYING THESE NOW
<div id="GLMpolicy">
(purchase and return policies go here)
</div>
- -->
+ -->
<p style="padding-top: 45px;">
{ssl_seal_head_script:h}
{ssl_seal_body_script:h}
{else:}
<div style="float: left;">
<div class="glmCartBlockTitle">No Payment Required</div>
- </div>
+ </div>
{end:}
<div style="float: right;">
<div class="glmCartTable totals" style="float: right;">
- {if:cartRequiresPayment}
-
+ {if:cartRequiresPayment}
+
<div class="glmCartHeader">
<div class="glmGrandTotals">
Grand Total {totals.price}
</div>
- <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
+ <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
<!-- <div class="glmCartText grand">Grand Total</div> -->
<!-- </div> -->
<!-- <div class="glmCartValues"> -->
<!-- <div class="glmCartBlockText">
NOTE: There will be a separate order number and a separate credit card transaction for each {term.prop.norm}.
</div> -->
- {end:}
-
+ {end:}
+
{if:adminUser}
<div>
<input id="AdminNoPaymentInfo" type="checkbox" name="AdminNoPayment" value="TRUE"> No payment info required for Admin User.
<div id="AdminNoPaymentInfoReason">
Reason for no payment information required:<br>
<select name="no_payment_reason">
- <option value=""></option>
+ <option value=""></option>
{foreach:noPaymentReasons,p}
<option value="{p:h}">{p:h}</option>
- {end:}
+ {end:}
</select>
</div>
{end:}
{end:}
-
+
<div id="GLMcheckout" style="float: right;">
- {if:!blockCheckout}
+ {if:!blockCheckout}
<a id="GLMcheckoutBtn" class="glmNavItemWide">{term.nav.purchase}</a>
{else:}
<a class="glmNavItemInactive">Unable to checkout - please see above.</a>
var checkoutButtonPressed = false;
var duration = 400;
-
+
// Checkout action
$('#GLMcheckoutBtn').click(function() {
-
+
// Prevent multiple submissions
if (checkoutButtonPressed == true) {
return;
}
-
+
// Check policy acceptance
var needPolicyChecked = false;
$(".glmPolicyCheckbox").each(function() {
}
checkoutButtonPressed = true;
- setBlocker();
+ setBlocker();
$('#GLMcheckoutForm').submit();
-
+
});
// Navigation buttons
- $('#GLMnavCart').on('click', function() { // Add to Cart
+ $('#GLMnavCart').on('click', function() { // Add to Cart
window.location = flex_baseSCRIPT + '&Action=Shop_cart';
});
$('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
$('#AdminNoPaymentInfo').on('click', function() {
checkNoPaymentInfo();
});
-
+
// Show or hide no payment info reasons list
- function checkNoPaymentInfo() {
+ function checkNoPaymentInfo() {
if ($('#AdminNoPaymentInfo').is(':checked')) {
$('#AdminNoPaymentInfoReason').show(0);
} else {
// Check is reasons are shown on startup.
checkNoPaymentInfo();
-
+
// Show submit access blocker
function setBlocker() {
$('#glmReloadBlocker').show();