CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Adding logic to ThankYou.tpl
Pages: [1]

Author Topic: Adding logic to ThankYou.tpl  (Read 571 times)

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Adding logic to ThankYou.tpl
February 10, 2011, 05:25:10 pm
My client is registering a large number of people for an event where the only paid attendees are service providers. The no-charge attendees can't be expected to check the "pay later" box, and as a result when they get to the Thank You screen they are displayed a message about PayPal Standard processing their registration. This is going to freak a lot of people out.

Is there a way to modify this:
Quote
{* PayPal_Standard sets contribution_mode to 'notify'. We don't know if transaction is successful until we receive the IPN (payment notification) *}
        {elseif $contributeMode EQ 'notify' and $paidEvent}
            <p>{ts 1=$paymentProcessor.processorName}Your registration payment has been submitted to %1 for processing. Please print this page for your records.{/ts}</p>

with some logic that says $amount is greater than 0?

Thanks,
B.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Adding logic to ThankYou.tpl
February 10, 2011, 09:28:37 pm
penguintrax :

You can apply the following patch  in templates/CRM/Event/Form/Registration/ThankYou.tpl

Code: [Select]
@@ -64,10 +64,15 @@
             {/if}
         {* PayPal_Standard sets contribution_mode to 'notify'. We don't know if transaction is successful until we receive the IPN (payment notification) *}
         {elseif $contributeMode EQ 'notify' and $paidEvent}
+     {if $amount > 0}
             <p>{ts 1=$paymentProcessor.processorName}Your registration payment has been submitted to %1 for processing. Please print this page for your records.{/ts}</p>
             {if $is_email_confirm}
                 <p>{ts 1=$email}A registration confirmation email will be sent to %1 once the transaction is processed successfully.{/ts}</p>
             {/if}
+     {else}
+        <p>{ts}Your registration has been completed. Please print this page for your records.{/ts}</p>
+    
+     {/if}

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

penguintrax

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 2
  • CiviCRM version: 3.3x and 4.x depending on site
  • CMS version: Joomla 1.5 or 1.7 depending on site
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.17
Re: Adding logic to ThankYou.tpl
February 11, 2011, 08:28:20 am
Thank you, thank you thank you!!!
« Last Edit: February 11, 2011, 09:15:54 am by Donald Lobo »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Adding logic to ThankYou.tpl

This forum was archived on 2017-11-26.