Skip to content
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

Use email_greeting where possible in receipts #12296

Merged
merged 1 commit into from
Jul 4, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Adds the use of the email_greeting to the default message templates - e.g for individuals a line like

Dear Mickey,

would be added. For organisations it is not added. Customised templates unchanged.

Before

No greeting

After

greeting

Technical Details

This is a recut of #11674

Comments

@civibot
Copy link

civibot bot commented Jun 10, 2018

(Standard links)

@eileenmcnaughton
Copy link
Contributor Author

test this please

@@ -1,4 +1,4 @@
{if $contact.email_greeting}{$contact.email_greeting},{/if}
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about what's going on here. Why assign a variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid a comma if there is none

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old code appears to already be doing that. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colemanw I only just added the old code on this template (as part of getting the message update functionality merged - I used it as an example). When I tested as part of this it didn't work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colemanw note change from {if $contact.email_greeting} to {contact.email_greeting} - it's not a smarty token

@JoeMurray
Copy link
Contributor

  1. There are likely other templates that should be changed if you're going to do it for these three. My sense: at least the three offline receipts too. Why not for even more at same time?

  2. With recent change around? not overwriting customized templates when the default template is upgraded, is there a notice given to folks on upgrade about what has changed in templates that they should maybe be aware of? These seem like simple updates that people could incorporate, but folks will not be aware they are available if I recall correctly the process.

@eileenmcnaughton
Copy link
Contributor Author

@JoeMurray to be honest I just changed the things from #11674 so I could resolve that pr - I don't grow it further but the submitter can if they want

I agree re messages but this has grown more than enough for this round of trying to deal with pr above

@eileenmcnaughton
Copy link
Contributor Author

@colemanw are you OK to merge this - there is another tpl update that @aydun needs to do but we need to get this merged first

@eileenmcnaughton
Copy link
Contributor Author

@colemanw would be good to get this merged for the rc

@seamuslee001
Copy link
Contributor

Change makes sense to me and i believe these are all good improvements

@seamuslee001
Copy link
Contributor

(CiviCRM Review Template WORD-1.1)

@seamuslee001 seamuslee001 merged commit 1374ecf into civicrm:master Jul 4, 2018
@eileenmcnaughton eileenmcnaughton deleted the greeting branch July 4, 2018 02:23
@eileenmcnaughton
Copy link
Contributor Author

Thanks @seamuslee001 (ping @magnolia61 - will be in 5.4)

@agh1
Copy link
Contributor

agh1 commented Jul 31, 2018

cross-referencing here: it looks like this addresses (maybe completes?) CRM-20184

@eileenmcnaughton
Copy link
Contributor Author

I think so - I'll close CRM-20184 - if there are missed places it can go in a follow up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants