From: Chuck Scott Date: Mon, 10 Sep 2018 20:47:51 +0000 (-0400) Subject: Fixed problem where not having checkout page top text in settings was masking checkou... X-Git-Tag: v1.0.17^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=fb36c10bdd107e59b9f7b4d723cb301401425963;p=WP-Plugins%2Fglm-member-db-registrations.git Fixed problem where not having checkout page top text in settings was masking checkout error messages. --- diff --git a/index.php b/index.php index 437738a..bd61992 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Associate - Event Registrations Add-On * Plugin URI: http://www.gaslightmedia.com/ * Description: Add-on to integrate registrations into Events add-on. - * Version: 1.0.16 + * Version: 1.0.17 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -17,7 +17,7 @@ * @package glmMembersRegistrationsAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.0.16 + * @version 1.0.17 */ // Check that we're being called by WordPress. @@ -41,7 +41,7 @@ if (!defined('ABSPATH')) { * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.0.16'); +define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.0.17'); define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.1'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/readme.txt b/readme.txt index 0eb4604..d672d49 100755 --- a/readme.txt +++ b/readme.txt @@ -25,6 +25,9 @@ e.g. 1. Activate the plugin through the 'Plugins' menu in WordPress == Changelog == += 1.0.17 = +* Fixed checkout error messages not showing on checkout page if not checkout page top text provided in settings + = 1.0.16 = * Fixed card expiration date changing when user fails at checkout page and checkout is redisplayed diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index 7c0b687..6214765 100755 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -4,9 +4,10 @@
    -
  • {$terms.reg_term_register_cap}
  • -
  • View Cart
  • -
  • Checkout
  • +
  • Select {$terms.reg_term_event_cap}
  • +
  • {$terms.reg_term_register_cap}
  • +
  • View Cart
  • +
  • Checkout
@@ -15,22 +16,21 @@ {if $checkoutPageText}

{$checkoutPageText}

+
+{/if} - {if $haveMessages} -
- Please Note: -
    - {foreach $messages as $m} -
  • {$m}
  • - {/foreach} -
-
- {/if} - - +{if $haveMessages} +
+ Please Note: +
    +{foreach $messages as $m} +
  • {$m}
  • +{/foreach} +
{/if} + {if $haveCart} {if $settings.reg_not_submitted_dialog} @@ -54,15 +54,15 @@
NOTE: Your {$terms.reg_term_registration} is not complete until you click the "{$terms.reg_term_button_checkout_page_submit}" button at the bottom of this page.
- {/if} + {/if}
-
-
+
+

Billing Information

@@ -143,12 +143,12 @@
E-Mail Address{if $regAccount.fieldRequired.email} *{/if}
- +

{$terms.reg_term_registration_cap} Summary

- + {assign var="summaryType" value="checkout"} {include file='front/registrations/cartSummary.html'}
@@ -173,11 +173,11 @@ {if $pmName == "NoCharge"} {* Nothing here for now *} - {else if $pmName == "OnArrival"} + {else if $pmName == "OnArrival"} {* Nothing here for now *} - {else if $pmName == "Cash"} + {else if $pmName == "Cash"} {* Nothing here for now *} - {else if $pmName == "Check"} + {else if $pmName == "Check"}
Name on Check{if $regAccount.fieldRequired.cc_name} *{/if}
@@ -193,7 +193,7 @@
{else if $pmName == "CreditCard"} - +
{if $settings.reg_proc_methods == 2 && $regAccount.fieldData.customer_profile_id != ''} {* If using Authorize.net and have a stored credit card profile *}
@@ -254,11 +254,11 @@

{$settings.reg_authorize_net_merchant_seal|unescape}

-
+
-
Your credit card will be processed through Authorize.Net. Click the image to the left to verify our security. +
Your credit card will be processed through Authorize.Net. Click the image to the left to verify our security.
-
+
{/if} {/if}
@@ -273,21 +273,21 @@
- + {else}
{/if} - + {/foreach} - +
{/if} {* / total charges > 0 *} {if apply_filters('glm-members-customfields-plugin-active', false)} {foreach $cart.events as $event} - {assign var="fid" value="glm_reg_customfields_reg_event_`$event.reg_event`"} {* assemble the uid with the current event ID *} + {assign var="fid" value="glm_reg_customfields_reg_event_`$event.reg_event`"} {* assemble the uid with the current event ID *} {if apply_filters('glm-members-customfields-have-fields', false, $fid)}

Additional information requested:

@@ -312,7 +312,7 @@

Terms and Conditions

You must check the boxes below to confirm that you agree to the Terms and Conditions for each {$terms.reg_term_event}.
- {if $haveGlobalTerms} + {if $haveGlobalTerms}
 
@@ -320,8 +320,8 @@
- {/if} - {if $haveEventTerms} + {/if} + {if $haveEventTerms} {foreach $cart.events as $event} {if $event.event_terms != ''}
@@ -343,16 +343,16 @@
(There is no charge for your request.)
{/if}
- + {if $settings.reg_show_navigation_aids}
Your {$terms.reg_term_registration} is not complete until you click here!
{/if} - +
- - + +
Please wait while we process your {$terms.reg_term_registration} request. If you don't see a new page, your {$terms.reg_term_registration} request may not have been processed.

Something may have gone wrong.

@@ -375,7 +375,7 @@

- NOTE: Your {$terms.reg_term_registration_plur} are not complete until you accept the PayPal payment and see the checkout summary page! + NOTE: Your {$terms.reg_term_registration_plur} are not complete until you accept the PayPal payment and see the checkout summary page!
@@ -387,14 +387,14 @@ jQuery(function($){ var payMethodNumb = false; - + // When payment method selection changes $('.payMethodSelector').on('change', function() { // Get the value from the selected Payment Method payMethodNumb = $(this).val(); payMethodSelection(payMethodNumb); - + }); function payMethodSelection(payMethodNumb) { @@ -415,7 +415,7 @@ $('#payPalPayButton').addClass('glm-hidden'); $('#payPalPayButton').attr('disabled','disabled'); } - + } // Dissable checkout button when first clicked to prevent multiple attempts @@ -442,12 +442,12 @@ // Don't actually do a submit yet return false; } - + // If something else is preventing submission, stop here. Use this with custom fields when there are required fields. if (e.isDefaultPrevented()) { return false; } - + // Show submit dialog box $( "#regSubmitDialog" ).dialog( "open" ); @@ -465,7 +465,7 @@ // Start with all pay method inputs dissabled $( document ).ready(function() { - + // Dialog box to show when submitting checkout page $( "#regSubmitDialog" ).dialog({ autoOpen: false, @@ -489,16 +489,16 @@ } } }); - + // Start with all payment method sections hidden $('.payMethodInput').attr('disabled', true); - // Get currently checked payment method - works after browser back button - Should never be needed, but just in case + // Get currently checked payment method - works after browser back button - Should never be needed, but just in case var payMethodNumb = $("input[name='payMethod']:checked").val() if (payMethodNumb == '') { payMethodNumb = {$defaultPayMethod}+0; } - + payMethodSelection(payMethodNumb); }); @@ -535,7 +535,7 @@ $(".cvv-input").mask("000#"); // Registration not submitted Dialog actions - {if $settings.reg_not_submitted_dialog} + {if $settings.reg_not_submitted_dialog} var notSubmittedTimer; notSubmittedDialog = $( "#regNotSubmittedDialog" ).dialog({ @@ -544,7 +544,7 @@ open: function(event,ui) { clearInterval(notSubmittedTimer); }, - close: function(event,ui) { + close: function(event,ui) { resetNotSubmittedTimer(); }, buttons: [ @@ -577,9 +577,9 @@ }); startNotSubmittedTimer(); - {/if} + {/if} - // When the checkout button is clicked and a PayPal payment is requested, this code is called to create a PayPal button inside of the dialog box + // When the checkout button is clicked and a PayPal payment is requested, this code is called to create a PayPal button inside of the dialog box var payPalButtonGenerated = false; function displayPayPalButton() { @@ -588,18 +588,18 @@ } payPalButtonGenerated = true; - + // PayPal button actions paypal.Button.render({ - + // Set your environment - + {if $payPalMode} env: 'sandbox', {else} env: 'production', {/if} - + // Specify the style of the button style: { label: 'pay', @@ -607,17 +607,17 @@ shape: 'rect', // pill | rect color: 'blue' // gold | blue | silver | black }, - + // To create a PayPal see app: https://developer.paypal.com/developer/applications/create client: { sandbox: '{$payPalSandboxClientId}', production: '{$payPalClientId}' }, - + // Wait for the PayPal button to be clicked payment: function(data, actions) { return actions.payment.create({ - invoice_number: '{$cartId}', + invoice_number: '{$cartId}', payment: { payer: { payer_info: { @@ -630,14 +630,14 @@ { description: '{$settings.reg_org_name} {$terms.reg_term_registration_plur_cap}', invoice_number: '{$cartId}', - amount: { - total: '{$cart.grandTotal}', - currency: 'USD' + amount: { + total: '{$cart.grandTotal}', + currency: 'USD' }, item_list: { items: [ - {foreach $cart.chargeItems as $item} - { + {foreach $cart.chargeItems as $item} + { name: '{$item.name|escape}', quantity: {$item.quantity}, price: {$item.price}, @@ -645,7 +645,7 @@ }, {/foreach} ] - } + } } ] } @@ -655,7 +655,7 @@ $('#payPalPaymentWarningMessage').html('
You canceled the PayPal Payment. Payment is required to submit your {$terms.reg_term_registration_plur}. If you don\'t wish to pay with PayPal, click the button below and select another payment method.'); }, onError: function(err) { -console.log(err); +console.log(err); $('#payPalPaymentWarningMessage').html('
There was a problem with your PayPal Payment. Payment is required to submit your {$terms.reg_term_registration_plur}. If you\'re unable to pay with PayPal, click the button below and select another payment method.'); }, // Wait for the payment to be authorized by the customer @@ -666,7 +666,7 @@ console.log(err); // Notify submit code above that it's OK to checkout payPalSubmitOK = true; - + $( "#payPalPaymentDialog" ).dialog("close"); // Add PayPal payment details to form @@ -679,11 +679,11 @@ console.log(err); $("#checkoutForm").submit(); }); } - + }, '#paypal-button-container'); - + } - + });