Updated call to glm_members_registrations_header filter to include $page parameter now required.
Changed Payment Codes to having to have a Unique Name.
Fixed problem with "Free" discount code for events (Global worked fine) in regCardSupport.php.
Checkout page now does not display any payment methods if Grand Total is $0.00 for any reason.
Checkout processing now sets payment method to "No Charge" if grand total is $0.00 (free) due to discounts.
Checkout now checks for any account data it can pre-fill in checkout form.
Fixed inability to edit notification subjects. Subject input was laying behind the text editor div.
Added name of application to merchant name for E-Mail from Authorize.net at checkout.
Fixed errors from smarty parameters that are no longer in use in list.html.
'field' => 'code',
'type' => 'text',
'required' => true,
+ 'unique' => true,
'use' => 'a'
),
'notify_email' => array (
'field' => 'notify_email',
'type' => 'text',
- 'required' => true,
+ 'required' => false,
'use' => 'a'
),
switch ($code['code_type']) {
case 'Free':
$thisDiscount = $eventCharges;
- $eventDiscounts = $totalCharges;
+ $eventDiscounts += $thisDiscount; // Don't worry, code below will prevent exceeding total of event charges
break;
case 'Amount':
switch ($code['code_type']) {
case 'Free':
$thisDiscount = $totalCharges;
- $totalDiscounts = $totalCharges;
+ $totalDiscounts += $totalCharges; // Don't worry, code below will prevent exceeding total of event charges
break;
case 'Amount':
padding: 2rem 0 1rem 0;
}
.glm-reg-message-title {
- padding: 0 0 1rem 0;
+ padding: 1rem 0 1rem 0;
}
.glm-reg-message-prompt {
text-align: right !important;
padding-top: 3rem;
}
.glm-reg-message-body {
- position: relative;
- top: -2.5rem;
}
/*}}} End New Register Account */
switch($_REQUEST['option2']) {
case 'new':
- $PayCode->insertEntry();
+ $res = $PayCode->insertEntry();
+ if (!$res['status']) {
+ foreach ($res['fieldFail'] as $ff) {
+ if (trim($ff) != '') {
+ $messages[] = $ff;
+ }
+ }
+ }
break;
case 'update':
$payCodeId = ($_REQUEST['payCodeId'] - 0);
- $x = $PayCode->updateEntry($payCodeId);
+ $res = $PayCode->updateEntry($payCodeId);
+ if (!$res['status']) {
+ foreach ($res['fieldFail'] as $ff) {
+ if (trim($ff) != '') {
+ $messages[] = $ff;
+ }
+ }
+ }
break;
case 'delete':
switch($_REQUEST['option2']) {
case 'new':
- $PayCode->insertEntry();
+ $res = $PayCode->insertEntry();
+ if (!$res['status']) {
+ foreach ($res['fieldFail'] as $ff) {
+ if (trim($ff) != '') {
+ $messages[] = $ff;
+ }
+ }
+ }
break;
case 'update':
$payCodeId = ($_REQUEST['payCodeId'] - 0);
- $x = $PayCode->updateEntry($payCodeId);
+ $res = $PayCode->updateEntry($payCodeId);
+ if (!$res['status']) {
+ foreach ($res['fieldFail'] as $ff) {
+ if (trim($ff) != '') {
+ $messages[] = $ff;
+ }
+ }
+ }
break;
case 'delete':
$messages[] = "This request has already been submitted!<br>The information below is a summary of your submitted request.";
-echo "<pre>".print_r($this->cart,1)."</pre>";
// Build check code for display of summary in iframe
$summaryCheck = md5($this->cart['request']['id'].GLM_MEMBERS_REGISTRATIONS_PLUGIN_SECRET.$this->cart['request']['account']);
$regAccount['fieldRequired']['comp_code'] = true;
$regAccount['fieldFail']['comp_code'] = '';
-// *** If redirected back, be sure to get the submitted data
+ // Check if there's no billing name/addr
+ if (trim($regAccount['fieldData']['bill_lname']) == '') {
+
+ // See if we have other name/addr data in account and use that
+ if (trim($regAccount['fieldData']['lname']) != '') {
+ $regAccount['fieldData']['bill_fname'] = $regAccount['fieldData']['fname'];
+ $regAccount['fieldData']['bill_lname'] = $regAccount['fieldData']['lname'];
+ $regAccount['fieldData']['bill_org'] = $regAccount['fieldData']['org'];
+ $regAccount['fieldData']['bill_title'] = $regAccount['fieldData']['title'];
+ $regAccount['fieldData']['bill_addr1'] = $regAccount['fieldData']['addr1'];
+ $regAccount['fieldData']['bill_addr2'] = $regAccount['fieldData']['addr2'];
+ $regAccount['fieldData']['bill_city'] = $regAccount['fieldData']['city'];
+ $regAccount['fieldData']['bill_state'] = $regAccount['fieldData']['state'];
+ $regAccount['fieldData']['bill_zip'] = $regAccount['fieldData']['zip'];
+ $regAccount['fieldData']['bill_country'] = $regAccount['fieldData']['country'];
+ $regAccount['fieldData']['bill_phone'] = $regAccount['fieldData']['phone'];
+ $regAccount['fieldData']['bill_fax'] = $regAccount['fieldData']['fax'];
+
+ // Otherwise if there's only one registrant, use their info, what's there
+ } elseif (count($this->cart['accounts']) == 1) {
+ $acct = current($this->cart['accounts']);
+ $regAccount['fieldData']['bill_fname'] = $acct['fname'];
+ $regAccount['fieldData']['bill_lname'] = $acct['lname'];
+ $regAccount['fieldData']['bill_org'] = $acct['org'];
+ $regAccount['fieldData']['bill_title'] = $acct['title'];
+ $regAccount['fieldData']['bill_addr1'] = $acct['addr1'];
+ $regAccount['fieldData']['bill_addr2'] = $acct['addr2'];
+ $regAccount['fieldData']['bill_city'] = $acct['city'];
+ $regAccount['fieldData']['bill_state'] = $acct['state'];
+ $regAccount['fieldData']['bill_zip'] = $acct['zip'];
+ $regAccount['fieldData']['bill_country'] = $acct['country'];
+ $regAccount['fieldData']['bill_phone'] = $acct['phone'];
+ $regAccount['fieldData']['bill_fax'] = $acct['fax'];
+ }
+ }
$view = 'checkout';
$Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config);
$misc = $Misc->getEntry(1);
- // If we don't have billing same flag initialized, do it now
- if (!isset($regAccount['billingSame'])) {
- $regAccount['billingSame'] = false;
- }
-
// Compile template data
$templateData = array(
'page' => 'checkout',
'eventCustomFieldsFidPrefix' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG.'-customfields-reg-event-'
);
- // echo "<pre>".print_r($templateData,1)."</pre>";
+ // echo "<pre>".print_r($regAccount,1)."</pre>";
// Return status, any suggested view, and any data to controller
return array(
* Process any Custom Fields
*/
- // ******* NEED TO DO THIS ********
+// ******* NEED TO DO THIS ??? ********
/*
* Process Payment?
*/
+echo "Grand Total = ".$this->cart['grandTotal']."<P>";
require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataManagement.php';
$Management = new GlmDataRegistrationsManagement($this->wpdb, $this->config);
$management = $Management->getEntry(1);
// Get payment method selected
- if (isset($_REQUEST['payMethod'])) {
- $payMethod = ($_REQUEST['payMethod'] - 0);
+ if ($this->cart['grandTotal'] > 0) {
+ if (isset($_REQUEST['payMethod'])) {
+ $payMethod = ($_REQUEST['payMethod'] - 0);
+ }
+ } else {
+ $payMethod = $this->config['payment_method_numb']['NoCharge'];
}
// Add billing information to billing array
$payment = array(
'transOpt' => $transOpt, // 0 = charge card, 1 = charge and store, 2 = charge stored card
- 'name' => $this->config['settings']['reg_org_name'], // Name of venue
- 'charge' => $this->cart['totalCharges'], // Total charges
+ 'name' => $this->config['settings']['reg_org_name'].' - '.$this->config['terms']['reg_term_registrations_name'], // Name of venue + name of "Registrations".
+ 'charge' => $this->cart['grandTotal'], // Total charges
'customerProfileId' => $customerProfileId, // Customer profile ID for charging stored card
'paymentProfileId' => $paymentProfileId, // Payment profile ID for charging stored card
'cctype' => $cardData['cc_type'], // Card Type
'reg_bulletin' => $misc['reg_bulletin']
);
- // Return status, any suggested view, and any data to controller
+ // echo "<pre>".print_r($templateData,1)."</pre>";
+
+ // Return status, any suggested view, and any data to controller
return array(
'status' => true,
'modelRedirect' => false,
{include file='admin/registrations/eventSubTabs.html'}
{/if}
+{if $option == 'globalCodes' && $haveMessages}
+<div class="glm-error">
+ <h3 class="glm-error">Please note:</h3>
+ <ul>
+ {foreach $messages as $m}
+ <li>{$m}</li>
+ {/foreach}
+ </ul>
+</div>
+{/if}
+
<div>
{if $option == 'globalCodes'}
<h1>Global {$terms.reg_term_payment_code_plur_cap}</h1>
<h1>{$terms.reg_term_event_cap} {$terms.reg_term_payment_code_plur_cap}</h1>
{/if}
</div>
-<div> </div>
+
+<div> </div>ssss
<table class="glm-admin-table glm-settings-table" style="width: 99%;">
<tr><td colspan="2">
-{apply_filters('glm_members_registrations_header', 'accountHeader')}
+{apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
<!--{if $cart.blockCheckout || !$haveCart || !$cart.haveEvents}
<div>
<div class="glm-reg-warning">You have not yet submitted your {$terms.reg_term_registration}. See above notes! <img src="{$assetUrl}/fingerUpRed.svg" style="height: 2em;"></div>
</div>
</div>
- {if $cart.totalCharges > 0}
+ {if $cart.grandTotal > 0}
<div class="glm-row">
<div class="glm-large-6 glm-small-12 glm-columns">
<h4>Payment Information</h4>
-{apply_filters('glm_members_registrations_header', 'accountHeader')}
+{apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
<br>
<form action="{$regUrl}?page=forgot" method="post">
<input type="hidden" name="option" value="submit">
-{apply_filters('glm_members_registrations_header', 'accountHeader')}
+{apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
<div class="row">
<div class="progress-container columns">
<ul class="progressbar">
{/if}
{if $haveRegEvents}
{foreach $regEvents as $event}
- {assign var=first value = $event.times|@key}
- {assign var=first_date value = $event.times.$first.start_time.timestamp}
-
- {* these are not in use - !!!Also need to stop using Recurrences here!!!! *}
- {* assign var=last value = $event.reg_time|@end *}
- {* assign var=last_date value = $event.end_datetime *}
- {* assign var=time_specific value = $event.time_specific.value *}
<!-- <pre>{$event|@print_r}</pre>-->
<!-- EVENT REG ITEM START -->
-{apply_filters('glm_members_registrations_header', 'accountHeader')}
+{apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
<br>
<form action="{$regUrl}?page=login" method="post">
<input type="hidden" name="option" value="submit">
-{apply_filters('glm_members_registrations_header', 'accountHeader')}
+{apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
<br>
<form action="{$regUrl}?page=register" method="post">
<input type="hidden" name="option" value="submit">
<div id="glm-reg-detail">
<h1>{$terms.reg_term_registrations_name}</h1>
- {apply_filters('glm_members_registrations_header', 'accountHeader')}
+ {apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
<div class="row progress-row">
<div class="progress-container columns">
<ul class="progressbar">
-{apply_filters('glm_members_registrations_header', 'accountHeader')}
+{apply_filters('glm_members_registrations_header', 'accountHeader', {$page})}
<div id="checkoutSuccess">
<div id="checkout-success-title">