From b2439ecb655d064b7cd97195c07903c74a52d75b Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 30 Oct 2019 06:24:06 +1100 Subject: [PATCH] dev/core#1344 Fix logic for displaying BillingName and Credit Card Details in email Receipts --- .../message_templates/contribution_online_receipt_html.tpl | 6 +++--- .../message_templates/contribution_online_receipt_text.tpl | 4 ++-- .../message_templates/event_offline_receipt_html.tpl | 2 +- .../message_templates/event_offline_receipt_text.tpl | 2 +- .../message_templates/membership_offline_receipt_html.tpl | 2 +- .../message_templates/membership_offline_receipt_text.tpl | 2 +- .../message_templates/membership_online_receipt_text.tpl | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xml/templates/message_templates/contribution_online_receipt_html.tpl b/xml/templates/message_templates/contribution_online_receipt_html.tpl index 1bf18025383d..b0602c8d549d 100644 --- a/xml/templates/message_templates/contribution_online_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_html.tpl @@ -311,7 +311,7 @@ {/if} - {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} + {if ($is_pay_later || $billingName)} {if $is_pay_later && !$isBillingAddressRequiredForPayLater} @@ -323,7 +323,7 @@ {$email} - {elseif $amount GT 0} + {elseif $billingName} {ts}Billing Name and Address{/ts} @@ -339,7 +339,7 @@ {/if} {/if} - {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0} + {if $credit_card_type} {ts}Credit Card Information{/ts} diff --git a/xml/templates/message_templates/contribution_online_receipt_text.tpl b/xml/templates/message_templates/contribution_online_receipt_text.tpl index 0ba58cd9a93a..0aa0ec963cd5 100644 --- a/xml/templates/message_templates/contribution_online_receipt_text.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_text.tpl @@ -126,14 +126,14 @@ {/foreach} {/if} -{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary} +{if ($is_pay_later || $billingName)} {if $is_pay_later && !$isBillingAddressRequiredForPayLater} =========================================================== {ts}Registered Email{/ts} =========================================================== {$email} -{elseif $amount GT 0} +{elseif $billingName} =========================================================== {ts}Billing Name and Address{/ts} diff --git a/xml/templates/message_templates/event_offline_receipt_html.tpl b/xml/templates/message_templates/event_offline_receipt_html.tpl index ad7de7ecb544..580419dace81 100644 --- a/xml/templates/message_templates/event_offline_receipt_html.tpl +++ b/xml/templates/message_templates/event_offline_receipt_html.tpl @@ -374,7 +374,7 @@ {/if} - {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} + {if $billingName} {ts}Billing Name and Address{/ts} diff --git a/xml/templates/message_templates/event_offline_receipt_text.tpl b/xml/templates/message_templates/event_offline_receipt_text.tpl index a68fd845a684..c8578b09e687 100644 --- a/xml/templates/message_templates/event_offline_receipt_text.tpl +++ b/xml/templates/message_templates/event_offline_receipt_text.tpl @@ -192,7 +192,7 @@ {if $checkNumber} {ts}Check Number{/ts}: {$checkNumber} {/if} -{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} +{if $billingName} ==========================================================={if $pricesetFieldsCount }===================={/if} diff --git a/xml/templates/message_templates/membership_offline_receipt_html.tpl b/xml/templates/message_templates/membership_offline_receipt_html.tpl index 24cfcdc47e7c..3c34f9cdb969 100644 --- a/xml/templates/message_templates/membership_offline_receipt_html.tpl +++ b/xml/templates/message_templates/membership_offline_receipt_html.tpl @@ -222,7 +222,7 @@ - {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later } + {if $billingName}
{ts}Billing Name and Address{/ts} diff --git a/xml/templates/message_templates/membership_offline_receipt_text.tpl b/xml/templates/message_templates/membership_offline_receipt_text.tpl index 7ed84e171a20..802deb0238d6 100644 --- a/xml/templates/message_templates/membership_offline_receipt_text.tpl +++ b/xml/templates/message_templates/membership_offline_receipt_text.tpl @@ -79,7 +79,7 @@ {/if} {if $isPrimary } -{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later } +{if $billingName} =========================================================== {ts}Billing Name and Address{/ts} diff --git a/xml/templates/message_templates/membership_online_receipt_text.tpl b/xml/templates/message_templates/membership_online_receipt_text.tpl index f4d0177c3d56..e12286f5fc56 100644 --- a/xml/templates/message_templates/membership_online_receipt_text.tpl +++ b/xml/templates/message_templates/membership_online_receipt_text.tpl @@ -154,14 +154,14 @@ {/foreach} {/if} -{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary} +{if ($is_pay_later || $billingName)} {if $is_pay_later} =========================================================== {ts}Registered Email{/ts} =========================================================== {$email} -{elseif $amount GT 0 OR $membership_amount GT 0 } +{elseif $billingName} =========================================================== {ts}Billing Name and Address{/ts} @@ -172,7 +172,7 @@ {$email} {/if} {* End ! is_pay_later condition. *} {/if} -{if $contributeMode eq 'direct' AND !$is_pay_later AND ( $amount GT 0 OR $membership_amount GT 0 ) } +{if $credit_card_type} =========================================================== {ts}Credit Card Information{/ts}