@eileenmcnaughton
authoreileen <emcnaughton@wikimedia.org>
Fri, 8 Jun 2018 11:21:05 +0000 (23:21 +1200)
committereileen <emcnaughton@wikimedia.org>
Fri, 8 Jun 2018 22:59:40 +0000 (10:59 +1200)
Add contact greeting to membership online receipt text message template

CRM/Upgrade/Incremental/MessageTemplates.php
xml/templates/message_templates/membership_online_receipt_text.tpl

index d6112275acc3151026a4d8c8f5cd78e3f0f87abb..158677f7d7cce85a344fd12f35fa91c6e034ec37 100644 (file)
@@ -106,7 +106,9 @@ class CRM_Upgrade_Incremental_MessageTemplates {
     $messages = [];
     foreach ($updates as $key => $value) {
       $templateLabel = civicrm_api3('OptionValue', 'getvalue', [
-        'return' => 'label', 'name' => $value['name'], 'options' => ['limit' => 1]
+        'return' => 'label',
+        'name' => $value['name'],
+        'options' => ['limit' => 1],
       ]);
       $messages[$templateLabel] = $value['upgrade_descriptor'];
     }
index aebd6d484ebba005bd41eac97aa0f7c536a6afb4..6072217a09e094a85f42995ed37a7d0f4b7bd0ef 100644 (file)
@@ -1,3 +1,4 @@
+{if $contact.email_greeting}{$contact.email_greeting},{/if}
 {if $receipt_text}
 {$receipt_text}
 {/if}