Answers.Body: <p>Checked on one of our sites and what I am seeing is that for Financial Type 6 we are using</p>
  <blockquote>
  <p>{if $ft_id == 6}</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-08T01:00:40.203Z
Answers.Text: I don't think $ft_id is something from core and I don't see it in the code. Is that something custom, possibly assigned to the template from php or maybe a few lines up in your template you have `{crmAPI var='ft_id' ...}` where you look it up based on the contribution id? In theory as of 5.43-ish you can use `{contribution.financial_type_id}` but it may not be available in all message templates. If using within a smarty `if` you might need to surround it with single quotes, but might not be necessary in this specific case, e.g. `{if '{contribution.financial_type_id}' == 4}`
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-08T18:13:16.983Z
Answers.Text: hmm. i see some customisation with *_civicrm_alterMailParams() and "if ($contribution['financial_type_id'] == 6) {
    $params['tplParams']['logoURL'] ="
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-08T18:13:50.950Z
Answers.Text: hopefully your comment has suggestions they can use and then perhaps you should change it to an Answer and I will bury mine
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-14T02:18:08.253Z
Answers.Text: I decided just to change the wording of the subject to "contribution" instead of "donation", that way it works for donations and purchases both!
Answers.UserDisplayName: erin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-14T18:22:05.360Z
Answers.Text: Love those types of solutions.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-05T21:01:48.850Z
Answers.LastActivityDate: 2023-11-05T21:01:48.850Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I am using a contribution page to sell an item. I would like to enable the receipt section so that people get an email confirmation of their purchase.</p>
  <p>My problem is that our receipt (on-line) template uses the subject line &quot;Thank you for your donation - tax receipt for [contribution page title]&quot;</p>
  <p>Obviously this is not a donation and no tax receipt will be issued (the non-deductible amount equals the purchase price).</p>
  <p>I don't know enough to edit the current code to achieve this, hoping someone can help.</p>
  <p>I do need to keep the &quot;if pay later&quot; then &quot;invoice&quot; part as well.</p>
  <p><code>{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Thank you for your Donation,  Tax Receipt for{/ts}{/if} - {$title} - {contact.display_name}</code></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-02T18:18:54.133Z
Comments.Text: If you are using a different Financial Type for your 'purchases' then yes i think you should be able to add in some more if/else and keep the PayLater if/else
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-02T21:23:29.510Z
Comments.Text: Yes I am using a different financial type - do you know the code for "if financial type ="?
Comments.UserDisplayName: erin
Tags: <contribution-page><receipts>
Title: Conditional email receipt subject line
ThreadText: # Conditional email receipt subject line
  
  (Asked by: username_0 on 2023-11-02)
  
  I am using a contribution page to sell an item. I would like to enable the receipt section so that people get an email confirmation of their purchase.
  
  My problem is that our receipt (on-line) template uses the subject line "Thank you for your donation - tax receipt for [contribution page title]"
  
  Obviously this is not a donation and no tax receipt will be issued (the non-deductible amount equals the purchase price).
  
  I don't know enough to edit the current code to achieve this, hoping someone can help.
  
  I do need to keep the "if pay later" then "invoice" part as well.
  
  `{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Thank you for your Donation, Tax Receipt for{/ts}{/if} - {$title} - {contact.display_name}`
  
  **Tags:** contribution-page, receipts
  
  > **Comments:**
  > **username_1**: If you are using a different Financial Type for your 'purchases' then yes i think you should be able to add in some more if/else and keep the PayLater if/else  
  > **username_0**: Yes I am using a different financial type - do you know the code for "if financial type ="?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-11-05. Score: 0
  
  Checked on one of our sites and what I am seeing is that for Financial Type 6 we are using
  
  > {if $ft\_id == 6}
  
  > **Comments:**
  > **username_2**: I don't think $ft_id is something from core and I don't see it in the code. Is that something custom, possibly assigned to the template from php or maybe a few lines up in your template you have `{crmAPI var='ft_id' ...}` where you look it up based on the contribution id? In theory as of 5.43-ish you can use `{contribution.financial_type_id}` but it may not be available in all message templates. If using within a smarty `if` you might need to surround it with single quotes, but might not be necessary in this specific case, e.g. `{if '{contribution.financial_type_id}' == 4}`  
  > **username_1**: hmm. i see some customisation with *_civicrm_alterMailParams() and "if ($contribution['financial_type_id'] == 6) {   $params['tplParams']['logoURL'] ="  
  > **username_1**: hopefully your comment has suggestions they can use and then perhaps you should change it to an Answer and I will bury mine  
  > **username_0**: I decided just to change the wording of the subject to "contribution" instead of "donation", that way it works for donations and purchases both!  
  > **username_1**: Love those types of solutions.  
  
  ---
  
  