From: Chuck Scott Date: Mon, 2 Jul 2018 19:45:32 +0000 (-0400) Subject: Fixed problems with term and conditions at checkout and other changes X-Git-Tag: v1.0.7^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2c2feda73b16513ddf5e26d427749f02779d8411;p=WP-Plugins%2Fglm-member-db-registrations.git Fixed problems with term and conditions at checkout and other changes More thourough testing for the existance of any terms and conditions at checkout. Updated checkout view file to implement stricter testing for terms and conditions. Modified text header for editing messages that go out when a manual payment is completed. Cleaned up readme.txt file. --- diff --git a/models/front/registrations/checkout.php b/models/front/registrations/checkout.php index f032264..bb6c954 100644 --- a/models/front/registrations/checkout.php +++ b/models/front/registrations/checkout.php @@ -366,6 +366,21 @@ class GlmMembersFront_registrations_checkout extends GlmRegCartSupport $Misc = new GlmDataRegistrationsMisc($this->wpdb, $this->config); $misc = $Misc->getEntry(1); + // Check for any terms and conditions + $haveTerms = false; + $haveGlobalTerms = false; + $haveEventTerms = false; + if (trim($misc['reg_terms']) != '') { + $haveTerms = true; + $haveGlobalTerms = true; + } + foreach ($this->cart['events'] as $event) { + if (trim($event['event_terms']) != '') { + $haveTerms = true; + $haveEventTerms = true; + } + } + // Compile template data $templateData = array( 'page' => 'checkout', @@ -386,6 +401,9 @@ class GlmMembersFront_registrations_checkout extends GlmRegCartSupport 'payMethodsNumb' => $this->config['payment_method_numb'], 'misc' => $misc, 'checkoutPageText' => $misc['checkout_page_text'], + 'haveTerms' => $haveTerms, + 'haveGlobalTerms' => $haveGlobalTerms, + 'haveEventTerms' => $haveEventTerms, 'globalTerms' => $misc['reg_terms'], 'eventCustomFieldsFidPrefix' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG.'-customfields-reg-event-', 'payPalClientId' => $this->config['settings']['reg_paypal_clientid'], @@ -393,7 +411,7 @@ class GlmMembersFront_registrations_checkout extends GlmRegCartSupport 'payPalMode' => $this->config['settings']['reg_paypal_test'] ); - // echo "payMethods
".print_r($availPaymentMethods,1)."
"; + // echo "payMethods
".print_r($misc,1)."
"; // Return status, any suggested view, and any data to controller return array( diff --git a/readme.txt b/readme.txt index e9c294e..269855c 100644 --- a/readme.txt +++ b/readme.txt @@ -32,9 +32,12 @@ in mobile views. = 1.0.5 = For registrant front end list show more than just Complete status. -= 1.0.0 = += 1.0.4 = -* Initial production release - includes PayPal integration +* Maintenance Release - Updates to "Settings"->"Registrations" page +* Added more Merge Tags that can be used for Subject and body of E-Mail messages +* Added a comprehensive Merge Tag reference at the bottom of page +* Added button to print Merge Tag reference sheet = 1.0.1 = @@ -43,9 +46,8 @@ For registrant front end list show more than just Complete status. * Added more information to checkout store failure reporting. * Various minor bug fixes. -= 1.0.4 = += 1.0.0 = + +* Initial production release - includes PayPal integration + -* Maintenance Release - Updates to "Settings"->"Registrations" page -* Added more Merge Tags that can be used for Subject and body of E-Mail messages -* Added a comprehensive Merge Tag reference at the bottom of page -* Added button to print Merge Tag reference sheet diff --git a/views/admin/settings/registrationsMisc.html b/views/admin/settings/registrationsMisc.html index 9565fd2..69b03df 100644 --- a/views/admin/settings/registrationsMisc.html +++ b/views/admin/settings/registrationsMisc.html @@ -202,7 +202,7 @@ {if $regMisc.fieldFail.registrant_notify_text}

{$regMisc.fieldFail.registrant_notify_text}

{/if} -  

Acknowledgement to Person Submitting the {$terms.reg_term_registration_plur_cap} (for payment types that are processed manually)

+  

Acknowledgement to Person Submitting {$terms.reg_term_registration_plur_cap} when a manually processed payment is accepted.

Subject: @@ -226,7 +226,7 @@ {if $regMisc.fieldFail.submission_ack_text}

{$regMisc.fieldFail.submission_ack_text}

{/if} -  

Acknowledgement to {$terms.reg_term_attendee_plur_cap} (for payment types that are processed manually)

+  

Acknowledgement to {$terms.reg_term_attendee_plur_cap} when a manually processed payment is accepted.

Subject: diff --git a/views/front/registrations/checkout.html b/views/front/registrations/checkout.html index a00ba5d..c4af6f2 100644 --- a/views/front/registrations/checkout.html +++ b/views/front/registrations/checkout.html @@ -305,13 +305,14 @@ {/if} {/foreach} {/if} + {if $haveTerms}

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 $globalTerms != ''} + {if $haveGlobalTerms}
 
@@ -319,9 +320,10 @@
- {/if} - {foreach $cart.events as $event} - {if $event.event_terms != ''} + {/if} + {if $haveEventTerms} + {foreach $cart.events as $event} + {if $event.event_terms != ''}
 
@@ -329,11 +331,12 @@
- {/if} - {/foreach} + {/if} + {/foreach} + {/if}
- + {/if} {if $cart.totalCharges > 0}

Total Charge: ${$cart.totalCharges|number_format:2}

{else}