-
-
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
dev/core#1344 Fix logic for displaying BillingName and Credit Card De… #15651
Conversation
(Standard links)
|
Oh dang - I missed that you did this |
{if $is_pay_later} | ||
=========================================================== | ||
{ts}Registered Email{/ts} | ||
|
||
=========================================================== | ||
{$email} | ||
{elseif $amount GT 0 OR $membership_amount GT 0 } | ||
{elseif $billingName} | ||
=========================================================== |
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.
So I left this out to think about it more but as you see it is possible to have email AND billing name. I think we need to reverse it to be
{if billingName}
{elseif $email}
{/if}
(you might want to merge mine & rebase this & focus in on the small number of trickier ones)
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.
@eileenmcnaughton that will still work in mine because note the elseif i believe is linked to the {if $is_pay_later}
not the {if $email}
Hmm - I think mine will hit the same :-( |
05fc34f
to
b2439ec
Compare
b2439ec
to
4efb011
Compare
@@ -311,7 +311,7 @@ | |||
</tr> | |||
{/if} | |||
|
|||
{if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} | |||
{if ($is_pay_later || $billingName)} |
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.
If you remove this file's changes for later the tests won't fail & we can do the others
@@ -126,14 +126,14 @@ | |||
{/foreach} | |||
{/if} | |||
|
|||
{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary} | |||
{if ($is_pay_later || $billingName)} |
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.
I think on this one we need to reverse the IF order
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.
so we have 2 if statements here L129 an L130 and the elseif in L136 only relates to the if in L130 as far as i can tell
@@ -374,7 +374,7 @@ | |||
</tr> | |||
{/if} | |||
|
|||
{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} | |||
{if $billingName} |
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.
Yay - straight forward - we can get this merged easily
@@ -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} |
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.
straightforward
@@ -222,7 +222,7 @@ | |||
<td> | |||
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;"> | |||
|
|||
{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later } | |||
{if $billingName} |
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.
yep
@@ -79,7 +79,7 @@ | |||
{/if} | |||
|
|||
{if $isPrimary } | |||
{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later } | |||
{if $billingName} |
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.
yep
@@ -154,14 +154,14 @@ | |||
{/foreach} | |||
{/if} | |||
|
|||
{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary} | |||
{if ($is_pay_later || $billingName)} |
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.
we need to reverse the if order on this one
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.
why would that help with this if tho, this is the if saying are we printing either the Registered Email or Billing Name sections. Then we do or are you suggesting we completely get rid of the outer if all together?
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.
Right - the outer if is not required we want
{if $billingName}
.... show billing name & email
{elseif $email}
... show email
{/if}
I actually already did this on the same receipt but the html version
@@ -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} |
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.
yep
@seamuslee001 3 patterns here
Maybe pull 1 & 2 out & we'll get all the 3s merged first? |
…ections as agreed in civicrm#15651
…tails in email Receipts
4efb011
to
1016611
Compare
@eileenmcnaughton rebased after latest template fixes, It will need to be re-run after we merge your change. |
test this please |
…ections as agreed in civicrm#15651
Tests passed - merging per tag |
…ections as agreed in civicrm#15651
…tails in email Receipts
Overview
This continues the patterns set by #15532 and #15646
Before
Complex logic used to include BillingName and also credit card details
After
Less complex logic
ping @eileenmcnaughton @mattwire