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 CiviEvent (Moderator: Yashodha Chaku) »
  • modifying Event confirmation email
Pages: [1]

Author Topic: modifying Event confirmation email  (Read 3424 times)

sckwooral

  • Guest
modifying Event confirmation email
August 12, 2009, 04:29:03 am
I want to remove some information from the Event confirmation email. I find the way it shows the Item Price and then the Item Total to be confusing and would like to remove the item price (the "each" in this case) from the email.

Ex:

---------------------------------------------------------
Item Qty Each Total
----------------------------------------------------------
Member 1 $ 450.00 $ 450.00
Concert 1 $ 38.00 $ 38.00
Dinner Cruise 1 $ 90.00 $ 90.00
Banquet 1 $ 92.00 $ 92.00
Member 1 $ 75.00 $ 75.00
Member 1 $ 75.00 $ 75.00
Member 1 $ 75.00 $ 75.00

Total Amount : $ 895.00


Also, I want to add the Category Title or whatever you call the title of the section with checkboxes. For instance I have a series of workshops named Workshop 1.1, 1.2, etc, each with titles, and then three checkboxes next to it (instead of pulldowns I wanted checkboxes because I felt it made more sense). The problem is that in the email, without the title, it is not clear what workshops you signed up for.
Ex:
Workshop 1.1 w/description
with checkboxes for Member $75.00, Non-Member $100.00, Student $50.00
Workshop 1.2 w/description
with checkboxes for Member $75.00, Non-Member $100.00, Student $50.00

but in the email you don't see "Workshop 1.1 - Member 1 $75.00" you just see "Member 1 $75.00".

How do you get the Title to show up in the email?

I do believe the template I want to modify is in
templates/crm/event/form/registration/ReceiptMessage.tpl

and the area I need to modify is :
(i added some >>> notes where I think I need to remove things)
Code: [Select]
===========================================================
{$event.fee_label}
===========================================================
{if $lineItem}{foreach from=$lineItem item=value key=priceset}

{if $value neq 'skip'}
{if $isPrimary}
{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
Participant {$priceset+1}
{/if}
{/if}
---------------------------------------------------------
{capture assign="ts_item}{ts}Item{/ts}{/capture}
{capture assign="ts_qty}{ts}Qty{/ts}{/capture}
>>>>Do I remove this next line?
{capture assign="ts_each}{ts}Each{/ts}{/capture}
{capture assign="ts_total}{ts}Total{/ts}{/capture}
{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
----------------------------------------------------------
{foreach from=$value item=line}
{$line.label|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"}
>>>>Do I remove this next line?
{$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
{/foreach}
{/if}
{/foreach}
{/if}
{if $amount && !$lineItem}
{foreach from=$amount item=amount key=level}{$amount.amount|crmMoney} {$amount.label}
{/foreach}
{/if}
{if $isPrimary }

{ts}Total Amount{/ts}     : {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}

thanks!

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: modifying Event confirmation email
August 12, 2009, 05:19:19 am
sckwooral :
You might wanna apply the following patch :

Code: [Select]
Index: templates/CRM/Event/Form/Registration/ReceiptMessage.tpl
===================================================================
--- templates/CRM/Event/Form/Registration/ReceiptMessage.tpl (revision 23260)
+++ templates/CRM/Event/Form/Registration/ReceiptMessage.tpl (working copy)
@@ -105,12 +105,11 @@
 ---------------------------------------------------------
 {capture assign="ts_item}{ts}Item{/ts}{/capture}
 {capture assign="ts_qty}{ts}Qty{/ts}{/capture}
-{capture assign="ts_each}{ts}Each{/ts}{/capture}
 {capture assign="ts_total}{ts}Total{/ts}{/capture}
 {$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
 ----------------------------------------------------------
 {foreach from=$value item=line}
-{$line.label|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
+{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.line_total|crmMoney|string_format:"%10s"}
 {/foreach}


You might want to use custom templates to achieve this. For more details, refer : http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in,+Profile,+Contribution+and+Event+Registration+Screens

Hope this helps!
Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sckwooral

  • Guest
Re: modifying Event confirmation email
August 12, 2009, 07:44:32 pm
Apologies, I'm new to reading "patches". So I get that the "-" and the "+" signs mean delete this line and add that line respectively. I see you suggest adding the "description" instead.

Great. I'll test it and see if that works.

Thanks!

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: modifying Event confirmation email
August 12, 2009, 09:51:18 pm
Quote
So I get that the "-" and the "+" signs mean delete this line and add that line respectively.
Yes
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: modifying Event confirmation email
August 13, 2009, 06:24:56 am
if you're on linux, the cleverly named "patch" program does that automatically
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

sckwooral

  • Guest
Re: modifying Event confirmation email
August 15, 2009, 03:38:38 am
For some reason when I added the template into the "civicrm_custom" folder (like you suggested and like I have done in the past with some Contribute templates) the Event final confirmation page shows up blank (as in white screen) and no confirmation emails were sent out even though CiviCRM retained the Event data and PayPal rang it up just fine. Because I was short on time I just went back to the original template and made my modifications there - instead of adding all parts of the patch I just deleted the item I didn't want to show. I know, that will come back to bite me when I upgrade 6 months from now. I just wasn't sure if it was the patch or the path to the "civicrm_custom" folder that was throwing the errors.

Any ideas, let me know. Other than that it works fine.

Thanks for your help!

Roland-ST

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
Re: modifying Event confirmation email
June 07, 2010, 03:42:36 am
I cant find CRM/Event/Form/Registration/ReceiptMessage.tpl in CiviCrm 3.1.5. Can you help me to find where is template for confirmation message for event registration now? 

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: modifying Event confirmation email
June 07, 2010, 03:54:34 am
Roland-ST :

3.1 onwards CiviCRM provides support for changing the email templates that are sent by system (System Workflow Messages) through message templates.

To change this message, you might wanna have a look at Administer →  Configure →  Message Templates and edit Events - Registration Confirmation and Receipt (on-line) { http://drupal.demo.civicrm.org/civicrm/admin/messageTemplates?action=update&id=19&reset=1 }

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Roland-ST

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
Re: modifying Event confirmation email
June 08, 2010, 05:27:34 am
Yashodha, thank a lot for you response. Thats great to have this functionality in UI. 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • modifying Event confirmation email

This forum was archived on 2017-11-26.