-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Payment Notification to use greeting, remove text to 'Please print this confirmation for your records. #13655
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,6 +169,8 @@ protected static function loadRelatedEntities($id) { | |
$contactID = self::getPaymentContactID($contributionID); | ||
list($displayName, $email) = CRM_Contact_BAO_Contact_Location::getEmailDetails($contactID); | ||
$entities['contact'] = ['id' => $contactID, 'display_name' => $displayName, 'email' => $email]; | ||
$contact = civicrm_api3('Contact', 'getsingle', ['id' => $contactID, 'return' => 'email_greeting']); | ||
$entities['contact']['email_greeting'] = $contact['email_greeting_display']; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems $contact is not used anywhere below so can we change it to: $entities['contact']['email_greeting'] = civicrm_api3('Contact', 'getvalue', ['id' => $contactID, 'return' => 'email_greeting_display']); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @monishdeb nope we can't - if it's empty getvalue will throw an error |
||
|
||
$participantRecords = civicrm_api3('ParticipantPayment', 'get', [ | ||
'contribution_id' => $contributionID, | ||
|
@@ -214,6 +216,7 @@ public static function getPaymentContactID($contributionID) { | |
public static function getConfirmationTemplateParameters($entities) { | ||
$templateVariables = [ | ||
'contactDisplayName' => $entities['contact']['display_name'], | ||
'emailGreeting' => $entities['contact']['email_greeting'], | ||
'totalAmount' => $entities['payment']['total'], | ||
'amountOwed' => $entities['payment']['balance'], | ||
'totalPaid' => $entities['payment']['paid'], | ||
|
@@ -263,6 +266,7 @@ public static function filterUntestedTemplateVariables($params) { | |
'refundAmount', | ||
'totalPaid', | ||
'paymentsComplete', | ||
'emailGreeting' | ||
]; | ||
// These are assigned by the payment form - they still 'get through' from the | ||
// form for now without being in here but we should ideally load | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ | |
{capture assign=emptyBlockStyle }style="padding: 10px; border-bottom: 1px solid #999;background-color: #f7f7f7;"{/capture} | ||
{capture assign=emptyBlockValueStyle }style="padding: 10px; border-bottom: 1px solid #999;"{/capture} | ||
|
||
<p>Dear {$contactDisplayName}</p> | ||
{if $emailGreeting}<p>{$emailGreeting},</p>{/if} | ||
|
||
<center> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree |
||
<table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;"> | ||
|
||
|
@@ -29,7 +30,6 @@ | |
{else} | ||
<p>{ts}A payment has been received.{/ts}</p> | ||
{/if} | ||
<p>{ts}Please print this confirmation for your records.{/ts}</p> | ||
</td> | ||
</tr> | ||
<tr> | ||
|
@@ -147,7 +147,7 @@ | |
<tr> | ||
<td> | ||
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;"> | ||
{if $contributeMode eq 'direct' and !$isAmountzero} | ||
{if $billingName || $address} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are assigned in the processCreditCard code. I would have liked to load them for the db but we don't retain an address per payment - only per contribution - probably we should |
||
<tr> | ||
<th {$headerStyle}> | ||
{ts}Billing Name and Address{/ts} | ||
|
@@ -160,7 +160,7 @@ | |
</td> | ||
</tr> | ||
{/if} | ||
{if $contributeMode eq'direct' and !$isAmountzero} | ||
{if $credit_card_number} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we would never have a card number here if it's not been used for a payment so we don't need contributeMode or to check the amount There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree |
||
<tr> | ||
<th {$headerStyle}> | ||
{ts}Credit Card Information{/ts} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as below!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these 2 lines will go next pr