Skip to content

Commit

Permalink
dev/core#1344 Simplify email template logic on displaying billing detail
Browse files Browse the repository at this point in the history
Per https://lab.civicrm.org/dev/core/issues/1344 we currently use complex & fragile logic whereas we can simply display
what we have gathered. Since email templates are already being upgraded this release it feels like a good
opportunity to clean these up too.

This just includes one template - but I'll rip through the rest if this gets merged & people agree
  • Loading branch information
eileenmcnaughton committed Oct 28, 2019
1 parent cbaa9a3 commit 0b639ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function setUp() {
* @throws \Exception
*/
public function testSubmit() {
$event = $this->eventCreate();
$event = $this->eventCreate(['is_monetary' => 1]);
$mut = new CiviMailUtils($this, TRUE);
CRM_Event_Form_Registration_Confirm::testSubmit([
'id' => $event['id'],
Expand Down Expand Up @@ -86,6 +86,7 @@ public function testSubmit() {
$mut->clearMessages();
$tplVars = CRM_Core_Smarty::singleton()->get_template_vars();
$this->assertEquals($participant['id'], $tplVars['participantID']);
$this->assertEquals('p p', $tplVars['billingName']);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
</tr>
{/if}

{if $contributeMode ne 'notify' and !$isAmountzero and (!$is_pay_later or $isBillingAddressRequiredForPayLater) and !$isOnWaitlist and !$isRequireApproval}
{if $billingName}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
Expand Down

0 comments on commit 0b639ac

Please sign in to comment.