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) »
  • Billing Name in email receipt
Pages: [1]

Author Topic: Billing Name in email receipt  (Read 1581 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Billing Name in email receipt
June 24, 2008, 08:08:49 am
I had a strange issue with the contribution email receipt. Under the billing name and address section, the value for the billing name was showing up as one of my custom field names+value. In other words, rather than showing my name when I completed the form, it showed "customlabel: customvalue". The actual custom field it picked up seemed rather random, though it was consistent.

The variable for the billing name is $name -- which is later used for the custom field loop in the template, and is also used in various other places, so I suspect somewhere along the line there a miss-assignment or conflict. What's strange is that in only showed up on the email, not on the confirmation or thank you screens.

Anyway, I fixed it by assigning a new variable (billingname) with duplicate value for $name to CRM/Contribute/Form/ContributionBase.php, around lines 357-358. I then use that in the template instead of $name and it works fine. I left the $name variable as it's used in several places that still work correctly.

Just throwing it out there in case someone else runs into the problem.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

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: Billing Name in email receipt
June 24, 2008, 11:58:38 am

I fixed this in trunk. i could not track where we lose the name value, but in general using 'name' in a set of smarty templates is probably not a good idea

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

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

This forum was archived on 2017-11-26.