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) »
  • Contribution receipts missing information
Pages: [1]

Author Topic: Contribution receipts missing information  (Read 426 times)

m4olivei

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 2
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: MySQL 5
  • PHP version: PHP 5.3
Contribution receipts missing information
November 05, 2013, 08:59:33 am
Hello,

Drupal 7.23
CiviCRM 4.3.5

Our client just noticed that their contribution receipts are missing a lot of information that they used to have.  They used to have the following information that no longer shows up in the receipt:

Header "Contribution Information"
Amount
Billing Name and Address
Credit Card Information

I figured out the template in question is: Administer > Communications > Message Templates > System Workflow Messages > Contributions - Receipt (on-line).

I then did a bunch of debugging to see what the issue is and I found that there are a couple key variables in the Smarty template that don't make it into the Smarty template for some reason, but I have no idea why.  The big one that a lot of the logic in the template hinges on that is missing is $amount. 

Why would $amount not be set?

Any ideas what I'm doing wrong?  Anyone else seeing this?

Thanks,
Matt

m4olivei

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 2
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: MySQL 5
  • PHP version: PHP 5.3
Re: Contribution receipts missing information
November 11, 2013, 08:44:28 am
I figured out what was wrong.

We were using a trick from http://sf2012.civicrm.org/sites/default/files/slides/Contribution%20Forms%20Wild.pdf to skip to confirmation form.  This was before that was available as an option on the Manage Contribution Page settings.  It was an implementation of hook_civicrm_postProcess() that looked like this:

Code: [Select]
**
 * Implements hook_civicrm_postProcess().
 * Skips the confirmation step for contribution pages.
 */
function mymodule_civicrm_postProcess($formName, &$form) {

       // Disable confirmation for contribution forms
  if ($formName == 'CRM_Contribute_Form_Contribution_Main') {
    $confirmForm =& $form->controller->_pages['Confirm'];
    $confirmForm->preProcess();

               // Hack to tell form validator that confirmation page is valid
    $data =& $form->controller->container();
               $data['valid']['Confirm'] = 1;

               // Redirect to thank you page
    $confirmForm->postProcess();
    $qfKey = $form->controller->_key;
         CRM_Utils_System::redirect(CRM_Utils_System::url( 'civicrm/contribute/transact', "_qf_ThankYou_display=1&qfKey=$qfKey", t
  }
}

Something in that hook was making it so that parts of data needed for the receipt weren't available when the receipt got generated.  The fix for me was to remove this hook, and change the setting on all my donation forms so that the confirmation step is skipped.

Thanks,
Matt

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Contribution receipts missing information

This forum was archived on 2017-11-26.