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) »
  • Invoice ID in confirmation email
Pages: [1] 2

Author Topic: Invoice ID in confirmation email  (Read 3433 times)

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Invoice ID in confirmation email
January 20, 2011, 04:42:31 am
Hello,

We're planning on implementing a system for memberships where all payments will take place offline (so no online payment processor). Upon clearing a cheque or bank transfer payment, our team will amend the contribution record from pending to completed, thus activating the membership.

I've noticed that when you do this for events, a 32 character transaction ID is generated (and then emailed out to the registrant), but it doesn't seem to happen for member dues (the field remains blank in the Edit Contribution page). That's an interesting discrepancy...

Nevertheless, my ideal workflow would be to include this or some other unique invoice number on the thank you screen and also in the email sent to the membership purchaser, so that they can write it on the back of their cheque or use it as the reference for the bank transfer (thus helping us match offline payments to membership applications). Would this be possible?

I saw another post where Donald suggested using $params['invoiceID']. However, my instinct would be to add something to the workflow message template which only seems to offer a limited set of tokens.

Does anyone have any advice?

Huge thanks and fingers crossed,

Robin

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: Invoice ID in confirmation email
January 20, 2011, 09:13:31 am

if i'm not mistaken, we generate an invoiceID for all online payments only. For offline payments, you need to set this field manually in additional details

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

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
January 21, 2011, 01:52:37 am
Hi, Lobo - and thanks for your reply!

When you say "additional details", where would that be? Do you mean a custom field on an embedded profile or something else?

Many thanks again for your help,

Robin

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: Invoice ID in confirmation email
January 21, 2011, 06:58:27 am

check:

http://drupal.demo.civicrm.org/civicrm/contact/view/contribution?reset=1&action=add&cid=103&context=contribution

(u'll need to be logged in to see the above link)

scroll down and u'll see Additional Details

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

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
January 24, 2011, 01:45:04 am
Ah, sure - I'd noticed that before. I was wondering whether there was any way to generate some kind of a unique reference / invoice code that could be displayed on the thank you screen / confirmation email for pay later contributions, rather than at a later stage (such as this screen). I think we may be happy to help code if you could suggest a starting point.

Thanks again,

Robin

Hans.S

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
Re: Invoice ID in confirmation email
January 24, 2011, 06:27:54 am
I'm using 2011-00{contact.contact_id} in my emails.

This works if it's an annual membership and that's the only thing that's being sold on the site because obviously the contact id does not change.

CiviCRM also generates a very long custom Invoice ID.
« Last Edit: January 24, 2011, 06:49:25 am by Hans.S »

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
January 24, 2011, 07:39:46 am
Hi, Hans

Yep, that's what I'm also doing for now, but what I'd really love to do is expose that long autogenerated Invoice ID earlier in the process so that it can show as soon as someone applies for membership - and also displays in the invoice email.

Best,

R

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: Invoice ID in confirmation email
January 24, 2011, 08:04:23 am

You potentially can do this via a hook and generate and store the invoice number (hook_postProcess in main / confirm form?)

you'll need to expose this invoice ID to smarty so that u can use it in the template

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

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
January 25, 2011, 06:18:01 am
Thanks, lobo - we'll look into that.

Best,

R

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
January 27, 2011, 04:24:15 am
Hi, Lobo

I've managed to expose the invoice Id in the thankyou page, by adding to thankyou.php then calling it from thankyou.tpl. With that in mind, do you think there's anything I can now do to pull this number into the email which also sends at that point (/civicrm/admin/messageTemplates/add?action=update&id=31&reset=1)

Huge thanks for your help thus far,

R

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: Invoice ID in confirmation email
January 27, 2011, 07:59:10 am

can you modify the email template the same way you did the thankyou tpl and include the invoice ID?

i think the email message template gets all the variables used by either the confirm or the thank you template
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

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
January 27, 2011, 08:46:18 am
Sounds good - where would I find the email template? I'm used to configuring emails via the workflow pages in the gui rather than in templates. Would it be /civicrm/templates/CRM/Contact/Form/Task/email.tpl  ??

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Invoice ID in confirmation email
February 03, 2011, 10:22:01 pm
We use this block in all our contribution & membership templates

Code: [Select]
<tr><td align="right"><BR>
Invoice/Receipt No.{$contributionID}</td></tr>
<tr><td align="right">
Contact No.{$contactID}</td></tr>

ContributionId is unique so it fits the bill for us
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

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: Invoice ID in confirmation email
February 04, 2011, 12:21:00 am
Quote
where would I find the email template
Under Admin / Configure / Message Templates eg http://drupal.demo.civicrm.org/civicrm/admin/messageTemplates&reset=1
then click on the SYstem Msg Templates
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

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Invoice ID in confirmation email
February 04, 2011, 01:31:54 am
Hi, Pete

It's a strange one. Even though by modifying the thankyou.php I can call the {$invoiceID} number on the thankyou page, that token's not available in the systen workflow messages so I can't add it there (and just putting it in rather than clicking the add tokens link) doesn't seem to do anything. For the time being, I'm using {contributionID} as Eileen suggested, but it's not quite what we're after. I'd love to be able to use the invoiceID if at all possible...

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Invoice ID in confirmation email

This forum was archived on 2017-11-26.