CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Changing the title of the emailed receipt
Pages: [1]

Author Topic: Changing the title of the emailed receipt  (Read 2569 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Changing the title of the emailed receipt
October 22, 2008, 03:05:13 am
Hi - any clues where I can modify the email title.
We thought it might be in ReceiptSubject.tpl but this only seems to contain the following

{strip} {ts}Receipt{/ts} - {$title} {/strip}

so presume it is coming in from 'title'? Ideally we would add the Organisation Name to this so it says 'Contribution Receipt from the xxx".

cheers
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Changing the title of the emailed receipt
October 22, 2008, 07:22:08 am

Any reason why you cant change that template and add your subject to it, i.e.

{strip} {ts}Contribution Receipt from the{/ts} {$organizationName}{/ts}{/strip}

only issue would be how you send the organizationName or if the template already knows about it etc

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Changing the title of the emailed receipt
October 23, 2008, 05:36:02 pm
Seems I may have gotten a few elements confused.

I thought I was trying to modify the email generated when a Contribution Page is filled in, but now think it is the email generated by the Offline Contribution - though it may have been both.

Anyhow, understood the tpl for the former was this

templates/CRM/Contribute/Form/Message.tpl

which I changed from:

{if $action eq 1024}{include file="CRM/Contribute/Form/Contribution/ReceiptPreviewHeader.tpl"}
{/if}
{if $formValues.receipt_text }
{$formValues.receipt_text}
{else}{ts}Thanks for your support.{/ts}{/if}

{ts}Please print this receipt for your records.{/ts}

to:
{if $action eq 1024}{include file="CRM/Contribute/Form/Contribution/ReceiptPreviewHeader.tpl"}
{/if}
{if $formValues.receipt_text }
{$formValues.receipt_text}
{else}{ts}The Green Party really appreciates your support!{/ts}{/if}

{ts}Please print this receipt for your records.{/ts}

But the email I received when I entered a new offline donation continues to say "thanks for your support". Have tried template caching issue but no joy

(namely that i need to  *  To empty template cache (civicrm/templates_c folder), add '&directoryCleanup=1')

or am I still up the wrong tree? cheers


oh yes - and if I want to change the email subject that currently says "Contribution Receipt" do I need to mess with

CRM/Contribute/Form/ReceiptSubjectOffline.tpl

in which I only see
{strip}
{$subject}
{/strip}

Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

nepalchi

  • Guest
Re: Changing the title of the emailed receipt
February 15, 2009, 03:46:50 pm
Were you able to resolve this? I am having the same issue and not able to find exactly where the subject is coming from. I did a text search but could not find any files with the subject.

Thanks.

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Changing the title of the emailed receipt
February 15, 2009, 10:29:17 pm
hi nepalchi

If you are doing offline contribution need to check
CRM/Contribute/Form/Message.tpl and
CRM/Contribute/Form/AdditionalInfo.php line around 439

In case of online contribution need to take a look for
CRM/Contribute/Form/Contribution/ReceiptSubject.tpl
CRM/Contribute/BAO/ContributionPage.php line around 182

kiran
« Last Edit: February 15, 2009, 10:38:25 pm by kiran »
You Are Designed To Choose... Defined By Choice.

nepalchi

  • Guest
Re: Changing the title of the emailed receipt
February 15, 2009, 11:54:02 pm
Kiran,

Thanks so much, the title was in AdditionalInfo.php. I have another problem I have been struggling with. The Received/Receipt Date do not appear in the receipt e-mail. I looked at the code in AdditionalInfo.php for off-line contribution:

  $form->assign('receive_date', CRM_Utils_Date::MysqlToIso(CRM_Utils_Date::format($formValues['receive_date'])));
  $form->assign('receipt_date', CRM_Utils_Date::MysqlToIso(CRM_Utils_Date::format($formValues['receipt_date'])));

and Message.tpl

===========================================================
{ts}Contribution Information{/ts}

===========================================================
{ts}Total Amount{/ts}: {$formValues.total_amount|crmMoney}
{ts}Contribution Type{/ts}: {$formValues.contributionType_name}
{if $receive_date}
{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
{/if}
{if $formValues.paidBy}
{ts}Paid By{/ts}: {$formValues.paidBy}
{/if}
{if $formValues.trxn_id}
{ts}Transaction ID{/ts}: {$formValues.trxn_id}
{/if}

{if $ccContribution}
===========================================================

Everything else but the received date works. I checked the DB and the attribute is correct and has value. I have looked at various other files but not been able to figure out a solution.

Thank you.

nepalchi

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Changing the title of the emailed receipt
February 16, 2009, 02:23:13 am
hi

There was a typo bug, now we have fixed for v2.1 and code will be part of next stable release ( v2.1.5   :) )

To fix for v2.1.4,  you need to change variable name $formValues to $params from line no 393 to line no 396 in AdditionalInfo.php
also you can take a look for corresponding patch

thanx
kiran

       
You Are Designed To Choose... Defined By Choice.

nepalchi

  • Guest
Re: Changing the title of the emailed receipt
February 16, 2009, 07:59:41 pm
Kiran,

This is great. Thank you for the pointer!!

Now I am trying to insert fields to message.tpl (Dear XYZ) and I looked through all forum topics but could not find anything besides: http://wiki.civicrm.org/confluence/display/CRMDOC/Mail-merge+Tokens+for+Contact+Data. It is not clear how that can be inserted in off-line email receipt. I tried a few things but it did not seem to work. I would imagine this is something easy?

Thanks again.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Changing the title of the emailed receipt

This forum was archived on 2017-11-26.