[php8-compat][REF] Fix more php8 test failures caused by template issues
[civicrm-core.git] / xml / templates / message_templates / event_registration_receipt_text.tpl
index 695b53d60432e6eea04eda09425abe997d2baf8c..907c074586c8e7463e09dbfeea4c6aeabf7e7d11 100644 (file)
@@ -1,15 +1,16 @@
-Dear {contact.display_name},
+{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
+
 {if $is_pay_later}
   This is being sent to you as an acknowledgement that you have registered one or more members for the following workshop, event or purchase. Please note, however, that the status of your payment is pending, and the registration for this event will not be completed until your payment is received.
 {else}
-  This is being sent to you as a {if $is_refund}confirmation of refund{else}receipt of payment made{/if} for the following workshop, event registration or purchase.
+  This is being sent to you as a {if !empty($is_refund)}confirmation of refund{else}receipt of payment made{/if} for the following workshop, event registration or purchase.
 {/if}
 
 {if $is_pay_later}
-  {$pay_later_receipt}
+  {if isset($pay_later_receipt)}{$pay_later_receipt}{/if}
 {/if}
 
-  Your order number is #{$transaction_id}. Please print this confirmation for your records.{if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if}
+  Your order number is #{$transaction_id}. {if !empty($line_items) && empty($is_refund)} Information about the workshops will be sent separately to each participant.{/if}
  Here's a summary of your transaction placed on {$transaction_date|date_format:"%D %I:%M %p %Z"}:
 
 {if $billing_name}
@@ -26,7 +27,7 @@ Dear {contact.display_name},
 {$email}
 {/if}
 
-{if $source}
+{if !empty($source)}
 {$source}
 {/if}